Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler: Add "Top 10 slowest modules" to --stats output #15514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nobodywasishere
Copy link
Contributor

Rebase of #12942 on current release

@straight-shoota
Copy link
Member

I'm wondering if we could polish the output a bit.
One issue is that the modules listed in "Top 10 slowest modules" overlap with those of "These modules were not reused". That creates a lot of noise.
Perhaps we could instead sort the list in "These modules were not reused" by compilation time (and print the time)?
I'm not sure if preserving the current ordering has any inherent value.
Or maybe we would only want to show the top 10 slowest modules when no previous files were reused (i.e. in the reused.zero? branch)? In that case we could still print the compilation time alongside the not-reused modules when 0 < reused < units.size.

The compilation time of individual modules should be in the order of seconds (or less than that) on reasonably modern hardware.
So formatting the durations with hours and minutes seems unergonomic. I think it would be reasonable to use a smaller unit there. seconds seems like a good fit. Or maybe even autoscale to form a nice human-readable presentation? A prototype for that would be Benchmark::Ips#human_iteration_time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants