[Rivet] stopwatch feature for timing tests?

Raghav Kunnawalkam Elayavalli raghav.k.e at cern.ch
Tue Jun 28 17:03:30 BST 2016


I just didnt try the standard profiling tools since i havnt used it before. as far as I checked the TStopwatch, now, it works very nicely. (i also used it in the past). 

Cheers
Raghav
 
> On Jun 28, 2016, at 5:59 PM, David Bjergaard <david.bjergaard at gmail.com> wrote:
> 
> Is there a reason the standard profiling tools don't work?
> $ time rivet
> 
> Other alternatives:
> http://fa.bianp.net/blog/2011/a-profiler-for-python-extensions/
> http://gernotklingler.com/blog/gprof-valgrind-gperftools-evaluation-tools-application-level-cpu-profiling-linux/
> 
> It would be nice if there were a prescription on the Rivet wiki for how to
> profile analyses since it isn't as straight forward as a traditional C++
> program.
> 
>    David
> 
> Raghav Kunnawalkam Elayavalli <raghav.k.e at cern.ch> writes:
> 
>> 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 -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>
>>    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
>> 
>> 
>> 
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet



More information about the Rivet mailing list