Skip to content

bench: render one console results table after benchmark completes - #33

Merged
wlgys8 merged 1 commit into
mainfrom
bench-deferred-report-table
Sep 12, 2026
Merged

bench: render one console results table after benchmark completes#33
wlgys8 merged 1 commit into
mainfrom
bench-deferred-report-table

Conversation

@wlgys8

@wlgys8 wlgys8 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bench 脚本原先边跑边 print,结果行会跟引擎日志(MotrixSim / mjcf parser 的 WARN 等)交错,可读性差。
  • 新增 bench/report.pyrender_table() 渲染带边框的 ASCII 表格,数字列自动右对齐、文本列左对齐。
  • bench/bench_env.py:收集全部测量结果,跑完后一次性输出结果表格;Perf breakdown 树也移到最后输出;--num-envs 默认值改为 2048;--json / --breakdown 语义不变。
  • bench/bench_physics.pyrun_single / run_node / run_shard 不再边跑边打印 key-value 块,改为返回 rows + notes;main 在整场 sweep 结束后输出一张汇总表和 footer(sim 配置、CPU/NUMA/binding 上下文、聚合信息)。
  • bench_wbt_kernel.py 本来就只在结束时输出一次 JSON,未改动。

效果:测量期间引擎日志照常输出,bench 报告作为一块连续的表格在最后输出,不再被日志污染。

Test plan

  • python bench/bench_env.py --env cartpole --num-envs 4 32 --steps 50 --warmup 2
  • python bench/bench_env.py --env cartpole --compare-env cartpole --num-envs 4 --steps 20 --warmup 1 --breakdown
  • python bench/bench_physics.py --num-envs 64 128 --iters 5 --warmup 1 --numa node

@wlgys8
wlgys8 force-pushed the bench-deferred-report-table branch from e69c9d6 to 62d921d Compare September 11, 2026 18:27
@wlgys8
wlgys8 merged commit 6074fa5 into main Sep 12, 2026
5 checks passed
@wlgys8
wlgys8 deleted the bench-deferred-report-table branch September 12, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant