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.
This adds a --stats option to print out the time spent in several places of the compiler (we should add more). It displays the number of calls to a given "key", the total time taken by the calls, the time taken by the calls ignoring subcalls, and the time spent before raising an exception.
Example for the report in #3800:
So out of 40 seconds it takes to check the file, 28 are spent in normalizing terms. 21s are spent under
simplify_vc
, but they are completely accounted by measured subcalls (in this case normalization).There is support for profiling already. I wrote this since I wanted an easy way to see where time is being spent without having to look up the profiling tags. Also, --profile requires a module name, which is not really useful. We could coallesce profiling into these new stats?
Also, uncommenting this line
will cause all profiling events to be recorded as stats. And that makes the example above look something like:
(see also the 10s in encode_sig!)