From d6be7528f6ce51640a7d7c0bc9a9882b3bec05d3 Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Fri, 7 Apr 2017 14:14:15 +0200 Subject: [PATCH] DDSim: Add printout of execution time at the end of simulation whitespace to emulate the output from DD4hep Solves #56 --- DDSim/DD4hepSimulation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py index 542f385dd..dae9c856b 100644 --- a/DDSim/DD4hepSimulation.py +++ b/DDSim/DD4hepSimulation.py @@ -481,6 +481,11 @@ class DD4hepSimulation(object): kernel.run() kernel.terminate() + userTime, sysTime,_cuTime, _csTime, _elapsedTime = os.times() + if self.printLevel <= 3: + print "DDSim INFO Execution Time: %3.2f s (User), %3.2f s (System)"% (userTime, sysTime) + + def __setMagneticFieldOptions(self, simple): """ create and configure the magnetic tracking setup """ field = simple.addConfig('Geant4FieldTrackingSetupAction/MagFieldTrackingSetup') -- GitLab