70 likes | 74 Views
EPICSv4 Workshop, SLS, 2013. pvMicroBenchmark. Matej Sekoranja. Goal – Micro benchmarking. Time the entire process-chain (pipeline) of particular action at of it ’ s points Generate nice reports. Existing tools.
E N D
EPICSv4 Workshop, SLS, 2013 pvMicroBenchmark Matej Sekoranja
Goal –Microbenchmarking Time the entire process-chain (pipeline) of particular action at of it’s points Generate nice reports
Existing tools • Quite some good and useful C++ profilers that are able to profile time … down to cache misses • Could be used (with help of additional processing) to microbenchmark single-threaded pipelines • They affect performance! • Roll our own…
Prototype A simple and tiny piece of code Fresh… hot code… from 1AM today Use of macros so that compiled release code contains no signs of mirobenchmarking code overhead Need to add a line at points to be timed, e.g. MB_POINT(testName, passId, stageNumber) Optimized for low overhead (~60ns per call above), thread-safe but no-locking used (now only works on Mac OS X + GCC compiler)
Prototype (cntd.) ns resolution (depends on the time given from OS) Output result is a CSV file per test 1,0,32742196024467 1,1,32742196106999 1,2,32742196109184 1,3,32742196293204 Simple, easy process (Unix command-line, Excel, …) Can be merged to allow inspecting pipeline spanning on different processes and even hosts (with help of proper clock synchronization)