[Rivet] stopwatch feature for timing tests?

Raghav Kunnawalkam Elayavalli raghav.k.e at cern.ch
Tue Jun 28 16:35:08 BST 2016


Yeah i want to internally check the timing of certain methods i have that get called during run time.

liking with root works and the timing is pretty accurate from both cases
rivet-buildplugin RivetAnalysis.so Analysis.cc<http://analysis.cc> -lRecursiveTools $(root-config --cflags --libs)

finished: Time from root TStopwatch
CPU time (min)  = 0.484667
Real time (min) = 0.487455

Rivet run completed at 2016-06-28 17:31:56, time elapsed = 0:00:29

Cheers
Raghav

On Jun 28, 2016, at 5:25 PM, Andy Buckley <a.g.buckley at gmail.com<mailto:a.g.buckley at gmail.com>> wrote:

On 28/06/16 16:18, Raghav Kunnawalkam Elayavalli wrote:
Hi Rivet experts,

I would like to optimize an analysis of mine for which i need the help of something like the TStopwatch feature. I assume i can use that from root itself, pointing to the rootcxxflags during compilation, but i wanted to know if Rivet has something like that. I cant find a timer class in the documentation. but in know its there since you printout the time elapsed.

I guess it's ok to link against ROOT like you say. With the usual caveats about accuracy of such timing tests.

The timing that we write out is just in the script layer, using Python's datetime module. It gives overall timing rather than per-component. At a simpler level you could just run it through the "time" shell command, but I guess you want to do some internal profiling? Maybe worth looking into valgrind, gprof, or perf for that.

Andy

--
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20160628/c51c86c0/attachment.html>


More information about the Rivet mailing list