sltbench
sltbench copied to clipboard
Measure cycles instead of time
It might be nice if as an alternative to measuring time you also supported measuring cycles (using perf_event_open). That would make it less important to fix frequency (for non memory bound functions).
PS: It would probably be easiest to use https://github.com/andikleen/pmu-tools/tree/master/jevents if one wants to support measuring cycles (the required code is small and could just be included if you want to avoid a dependency) . This solution is Linux only. I'm not aware of any cross-platform library. But if it is an optional feature that might be fine. If it needs to also work on MacOS and Windows one would need to use other libraries such as https://msdn.microsoft.com/en-us/library/windows/desktop/dd796399(v=vs.85).aspx and https://github.com/opcm/pcm/tree/master/MacMSRDriver PPS: One could also measure instructions which might be useful in some cases.
Thanks for info.
Ok, I will try to add feature.
(unfortunately, I cannot give any promise about deadline)