Repository navigation
Recover per-file timings from profiles in dune-based bench packages. - #22975
Merged
coqbot-app[bot] merged 2 commits intoDec 5, 2026
Merged
Conversation
Packages built with dune do not print the TIMED=1 lines that make-both-time-files.py expects, so their perfile_timings logs were empty. Compute the real time of each file from the process event of the .vo.prof.json files written thanks to ROCQ_PROFILE_FILE, after each iteration, and feed it to the per-file comparison.
Contributor
|
make-both-time-files can also process dune traces but we would have to locate the dune build dir I guess |
Contributor
SkySkimmer
reviewed
Dec 5, 2026
|
|
||
| prof_json_timings() { | ||
| find "$1" -name '*.vo.prof.json' | while read -r prof; do | ||
| awk -v vo="${prof%.prof.json}" '/"name": "process"/ { t = $0; sub(/.*"ts": /, "", t); sub(/,.*/, "", t); if (/"ph": "B"/) b = t; else if (/"ph": "E"/) e = t } END { if (b != "" && e != "") printf "%s (real: %.2f)\n", vo, (e - b) / 1e6 }' "$prof" |
Contributor
There was a problem hiding this comment.
is this some awk based json parsing? can we use jq instead?
Member
Author
There was a problem hiding this comment.
In case this was not clear from my legendary inability to write shell scripts, this is LLM slop. I can try to ask the machine to use jq instead if you believe this is more robust.
Contributor
Member
Author
|
@SkySkimmer seems to work as intended with the jq variant. |
SkySkimmer
approved these changes
Dec 5, 2026
Contributor
|
@coqbot merge now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages built with dune do not print the TIMED=1 lines that make-both-time-files.py expects, so their perfile_timings logs were empty. Compute the real time of each file from the process event of the .vo.prof.json files written thanks to ROCQ_PROFILE_FILE, after each iteration, and feed it to the per-file comparison.