`calculate_summary_stats` takes significant time with lots of untested mutants
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
首先跟踪 status_printer、print_stats 和 calculate_summary_stats,然后使用 mutmut run 和 tests_dir 的一个子集重现报告中的比较结果。完成的标准是:汇总统计相关工作不再导致所报告的变慢,同时状态输出仍然正确;该 issue 没有指定要运行的具体文件或测试。
由索引模型根据 Issue 内容生成。
描述
I've ran mutmut run once with the normal print_stats method and once with calculate_summary_stats(...) commented out. In my case (with ~2000 of untested mutants) this changed it from ~80s to ~70s total runtime.
I think usually this won't be noticeable, however when running only a subset of the tests (eg with tests_dir), it is normal to have many untested mutants. For this use case, this is a significant slowdown.
The status_printer method already has a check to print only every 0.1s. Maybe we could make it a class that exposes a would_print() -> bool method and then we only calculate the summary stats every 0.1s. Or we could pass it the summary stats creating function as argument, and the status_printer calls the method every 0.1s.
Maybe we could also make calculate_summary_stats more efficient, I didn't look into that.
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 185
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
boxed/mutmut 的其他 Issue
-
Removing `not` from a parenthesized multi-line expression drops the parentheses (InvalidGeneratedSyntaxException, 3.8.0)可能已有人在做 @jihtsan 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
`run` with a `name__mutmut_*` pattern runs the whole test suite in the clean-test check可能已有人在做 @Ishaan400 于 16 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
Invalid unary plus generated in match statement可能已有人在做 @GhostCoder6969 于 25 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
conda-forge/conda-forge-bot#7025 ·
维护者通常 1 天内回复
-
area:ci
难度 1/5 1 小时以内 新手友好度 74/100
catincloud-labs/dagster-dex#149 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
home-assistant/core#188424 ·
维护者通常 1 天内回复
-
Review backlog (docs-currency): README 'CI run' link lands on a run whose overall badge is cancelled未关闭agent/reviewer needs-kind needs-triage
难度 2/5 1-3 小时 新手友好度 63/100
projectbluefin/utah#880 · 2 条评论 ·
维护者通常 1 天内回复
-
LSan reports obj_gen leak on post-parse usage() exits (aarch64)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
redis/memtier_benchmark#850 ·
维护者通常 1 天内回复