diff --git a/algo/ca/core/utils/CaTimer.h b/algo/ca/core/utils/CaTimer.h index 712cb4806dd96f9f612b063ef69ef8554cd8f6dc..90b519164edbc7ad3543b8a5c1dc1d1b9b4e293f 100644 --- a/algo/ca/core/utils/CaTimer.h +++ b/algo/ca/core/utils/CaTimer.h @@ -69,6 +69,9 @@ namespace cbm::algo::ca /// \brief Gets total time [s] double GetTotal() const { return static_cast<double>(fTotal) * 1.e-9; } + /// \brief Gets total time [ms] + double GetTotalMs() const { return GetTotal() * 1.e3; } + /// \brief Resets the timer void Reset(); diff --git a/algo/global/Reco.cxx b/algo/global/Reco.cxx index 4cde9b421791721816e4f39e032a3ae5e90825b3..14f61de9fd55a774fdb2d94aaa0439bf32e94cad 100644 --- a/algo/global/Reco.cxx +++ b/algo/global/Reco.cxx @@ -381,9 +381,9 @@ void Reco::QueueTrackingMetrics(const ca::TrackingMonitorData& monitor) } GetMonitor().QueueMetric("cbmreco", {{"hostname", fles::system::current_hostname()}, {"child", Opts().ChildId()}}, - {{"caRecoTimeTotal", monitor.GetTimer(ca::ETimer::FindTracks).GetTotal()}, - {"caTrackFinderTime", monitor.GetTimer(ca::ETimer::TrackFinder).GetTotal()}, - {"caTrackFitterTime", monitor.GetTimer(ca::ETimer::TrackFitter).GetTotal()}, + {{"caRecoTimeTotal", monitor.GetTimer(ca::ETimer::FindTracks).GetTotalMs()}, + {"caTrackFinderTime", monitor.GetTimer(ca::ETimer::TrackFinder).GetTotalMs()}, + {"caTrackFitterTime", monitor.GetTimer(ca::ETimer::TrackFitter).GetTotalMs()}, {"caNofRecoTracks", monitor.GetCounterValue(ca::ECounter::RecoTrack)}, {"caNofRecoHitsTotal", monitor.GetCounterValue(ca::ECounter::RecoHit)}, {"caNofRecoHitsUsed", monitor.GetCounterValue(ca::ECounter::RecoHitUsed)},