Repository navigation
-measure: phases nest, every step of a map build is measured, the parts add up - #1452
Merged
Merged
Conversation
…ts add up TimeTaker.Recording kept one open phase: beginning a phase ended the open one, so a phase inside another (flatten in eliminate tuples, importing files in injecting map data) ended its parent, and the parent's end was then ignored. Phases and measured steps nest now, an end ends the innermost open phase, a step ends the phases left open in it, and the report shows each step under the one it ran in with what the steps of a level do not account for. The total runs from the creation of the request. Measured now: loading the project (CLI), replacing the map script, both type checks, the model copy, the cached map, the transformation and printing of the program, the compile-time runner, writing the requested script, copying and finalising the output map. The Jass translation has its parts as phases, the vararg elimination its own phase, and froptimize ends. A build prints the report too.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 652a0220e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This was referenced Oct 13, 2026
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.
-measureshowed totals which its steps did not add up to, and no type check.Nesting.
TimeTaker.Recordingkept one open phase: beginning a phase ended the open one. A phase inside another (flattenineliminate tuples,Importing filesinInjecting map data) ended its parent, the parent'sendPhasewas then ignored, and the rest of the parent was counted nowhere. Phases and measured steps nest now:endPhaseends the innermost open phase (an end with no phase open in the current step is ignored, so it cannot end the step), and a step ends the phases left open inside it. The report shows each step under the one it ran in, and a(not measured)line for what the steps of a level do not account for, so the parts add up to the total. The total runs from the creation of the request instead of the first phase.Coverage. Measured now:
Load project(CLI, through the request's recorder),Replace map script,Typecheck project with map scriptandTypecheck program(the two checks),Copy model,Prepare cached map,Rebuild project,Transform program to Jass/Lua,Print Jass/Lua,run compiletime functions(the runner itself),Write requested script,Copy output map,Finalize map. In the compiler, the vararg elimination is its own phase (anendPhasewithout a phase stood there),froptimizeends, andtranslate to jasshas its parts as phases (remove empty package inits, remove garbage, call relations, print IM as Jass). The build pipeline prints the report too, not only a run.On a large map the report covers all but about 0.7 s of a 48.7 s build; before, about 6 s of the top level and parts of several phases were missing.
TimeTakerTestscovers a phase inside a phase, a step ending phases left open in it, a stray end, and the not measured line. Run locally: TimeTakerTests, MapCancellationTest, CliBuildMapTests, CompiletimeTests, IncrementalModelOracleTests, MapRequestPatchTargetTests, OptimizerTests.