Added performance counters to zippers - #14
Conversation
|
Hey. Sorry I didn't see this PR amid all the other churn. High-level questions:
|
|
Can we pull this at least into a non master branch @luketpeterson ? |
|
Bump @luketpeterson |
|
I have no problem main-lining this, but if it's targeted towards internal optimization then it probably belongs behind a feature gate. @imlvts, What are your opinions on these questions? #14 (comment) |
|
Just to clean house, it would be good to do something about this PR. There is useful work here. My feeling is that there are two things here:
*I don't know if the timer resolution makes the measurements unreliable. My Macbook has a 24Mhz timer so it only measures 41ns and a lot of zipper ops run faster than that when cache is hit. My guess is that this would shake out across millions of operations, and be a non-issue. |
This introduces
timed_spanmacros used in all the zipper methods.The macro uses a global array for each span, incrementing times the span was entered, and platform-specific TSC delta spent in the span.
The counters may be either read from a static array, or printed using
pathmap::timed_span::print_counters();.