-
Notifications
You must be signed in to change notification settings - Fork 66
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
Printing stats for template sets #17
Conversation
Found a bug, so this particular revision shouldn't be merged. This revision doesn't analyze recursive templates correctly. The duration that is in I'll see if I can pull off a more heavy duty analysis where I avoid this issue. I'm not sure if it extends to the back-end times as well. |
My apologies for leaving this in the failed state for so long, but I haven't been able to find the time to fix the PR yet. Is the general idea something that is of interest to the maintainer? |
yeah, the idea sounds really good! |
Now, we count the total time for a template instantation (e.g. tuple<A, B, C>), but we don't count any time that comes from another instation of the same template if it is a child (e.g. tuple<B, C>). This seemed to give more actionable results than counting self-time. This change bundles in some refactors. If requested, they can be separated out. Times now stay as microseconds up until the moment we output them. This reduces the amount that we bias our sums against large numbers of small times. EventIndex and DetailIndex have been added to provide more type safety when accessing the various data vectors. It was hard for me to keep straight which index went where.
Let me know if you want me to split this PR up. I can imagine having different PRs for the ms -> us change, the EventIndex + DetailIndex change, the change where instantiations track event index instead of detail index, and finally, a change that adds the feature. Or we can go with the big thing that I've got now. Your call. |
Very nice, thanks! |
Sometimes, you don't just want to know the most expensive instantiation of a template (i.e.
tuple<int, float>
), you want to know which templates as a whole are expensive (i.e.tuple
). This new analysis does that.Example output:
Similarly, you don't always want to know which specific function took a long time to optimize, but which collection of template functions.
Example output: