|
|
Program Timing -- SumTimeAction action
- Include SumTimeAction in your program. Here is an example from
$BFDIST/releases/7.12.5/Bear/AppUserBuild.cc.
#include "RecoUtils/AppActionSumTime.hh"
theFramework->actions()->append(new AppActionSumTime);
- Enable the action. Bear in release 7.12.5 enables all actions:
catch { module actions enable all }
Or you can selectively enable this one action:
catch { action on "SumTimeAction" }
- Run the program. Looks for lines with the AppAST in it, e.g.
young@count $ grep AppAST your_log_file
AppAST: SumBeg | NEvt | SumEvent | AvgEvent |SumEnd | Module
AppAST: ------- |-------- |---------- |---------- |------- |------------------
AppAST: 0.00 | 1000 | 0.39 | 0.0004 | 0.00 |EvtCounter
AppAST: 0.00 | 1000 | 0.02 | 0.0000 | 0.00 |GenBuildEnv
AppAST: 0.03 | 1000 | 0.06 | 0.0001 | 0.00 |HbkTupleEnv
AppAST: 0.11 | 1000 | 0.01 | 0.0000 | 0.00 |PdtInit
AppAST: 0.00 | 1000 | 0.24 | 0.0002 | 0.00 |CreateTrkLists
...
- You can use "sort -rn -k 8.1" to get an ordered list.
young@count $ SumTimeOrder your_log file
AppAST: SumBeg | NEvt | SumEvent | AvgEvent |SumEnd | Module
AppAST: ------- |-------- |---------- |---------- |------- |------------------
AppAST: 0.00 | 1000 | 5520.27 | 5.5203 | 0.00 |EmcMakeIntersections
AppAST: 0.00 | 1000 | 4763.77 | 4.7638 | 0.00 |TrkMassFitter
AppAST: 0.01 | 1000 | 4120.26 | 4.1203 | 0.00 |KalFit
AppAST: 0.02 | 1000 | 2457.81 | 2.4578 | 0.00 |DchTrackFinder
AppAST: 0.02 | 1000 | 2407.52 | 2.4075 | 0.00 |DchSegBunchT0
AppAST: 0.00 | 1000 | 1703.03 | 1.7030 | 0.00 |DchMakePid
...
[Program Timing]
[Babar Home Page]
This page is maintained by Charlie Young
Email young@slac.stanford.edu
|
|