Skip to content
Snippets Groups Projects
Commit 14b91c5d authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

online: Fix NaNs in monitoring.

parent 236e9477
No related branches found
No related tags found
1 merge request!1806online: Fix NaNs in monitoring.
Pipeline #29268 passed
......@@ -478,7 +478,7 @@ void Reco::QueueTofCalibMetrics(const tof::CalibrateMonitorData& mon)
GetMonitor().QueueMetric("cbmreco", {{"hostname", fles::system::current_hostname()}, {"child", Opts().ChildId()}},
{
{"tofCalibTimeTotal", mon.fTime.wall()},
{"tofCalibThroughput", mon.fTime.throughput()},
{"tofCalibThroughput", FilterNan(mon.fTime.throughput())},
{"tofCalibNumDigisIn", mon.fNumDigis},
{"tofCalibUnknownRPC", mon.fDigiCalibUnknownRPC},
});
......@@ -519,16 +519,16 @@ void Reco::QueueEvbuildMetrics(const evbuild::EventbuildChainMonitorData& mon)
double totalSelectionRatio = nDigisTotal > 0 ? double(nDigisInEventsTotal) / nDigisTotal : 0;
GetMonitor().QueueMetric("cbmreco", tags,
{{"digiTriggerTimeTotal", mon.digiMultTrigger.time.wall()},
{"digiTriggerThroughput", mon.digiMultTrigger.time.throughput()},
{"digiTriggerThroughput", FilterNan(mon.digiMultTrigger.time.throughput())},
{"hitTriggerTimeTotal", mon.hitMultTrigger.time.wall()},
{"hitTriggerThroughput", mon.hitMultTrigger.time.throughput()},
{"hitTriggerThroughput", FilterNan(mon.hitMultTrigger.time.throughput())},
{"v0TriggerNumTrackPairs", mon.v0Trigger.numTrackPairs},
{"v0TriggerNumTrackPairsCoinc", mon.v0Trigger.numTrackPairsAfterTimeCut},
{"v0TriggerErrTracksUnsorted", mon.v0Trigger.errTracksUnsorted},
{"v0TriggerTimeTotal", mon.v0Trigger.time.wall()},
{"v0TriggerThroughput", mon.v0Trigger.time.throughput()},
{"v0TriggerThroughput", FilterNan(mon.v0Trigger.time.throughput())},
{"eventbuildTimeTotal", mon.evbuild.time.wall()},
{"eventbuildThroughput", mon.evbuild.time.throughput()},
{"eventbuildThroughput", FilterNan(mon.evbuild.time.throughput())},
{"numTrigger", mon.digiMultTrigger.nTriggers},
{"numEvents", mon.evbuild.nEvents},
{"totalEvSelectionRatio", totalSelectionRatio}});
......@@ -556,12 +556,12 @@ void Reco::QueueProcessingMetrics(const ProcessingMonitor& mon)
}
MetricFieldSet fields = {
{"processingTimeTotal", mon.time.wall()}, {"processingThroughput", mon.time.throughput()},
{"caRecoTimeTotal", mon.timeCA.wall()}, {"caRecoThroughput", mon.timeCA.throughput()},
{"trdRecoTimeTotal", mon.timeTRD.wall()}, {"trdRecoThroughput", mon.timeTRD.throughput()},
{"tofRecoTimeTotal", mon.timeTOF.wall()}, {"tofRecoThroughput", mon.timeTOF.throughput()},
{"stsRecoTimeTotal", mon.timeSTS.wall()}, {"stsRecoThroughput", mon.timeSTS.throughput()},
{"unpackTimeTotal", mon.timeUnpack.wall()}, {"unpackThroughput", mon.timeUnpack.throughput()}};
{"processingTimeTotal", mon.time.wall()}, {"processingThroughput", FilterNan(mon.time.throughput())},
{"caRecoTimeTotal", mon.timeCA.wall()}, {"caRecoThroughput", FilterNan(mon.timeCA.throughput())},
{"trdRecoTimeTotal", mon.timeTRD.wall()}, {"trdRecoThroughput", FilterNan(mon.timeTRD.throughput())},
{"tofRecoTimeTotal", mon.timeTOF.wall()}, {"tofRecoThroughput", FilterNan(mon.timeTOF.throughput())},
{"stsRecoTimeTotal", mon.timeSTS.wall()}, {"stsRecoThroughput", FilterNan(mon.timeSTS.throughput())},
{"unpackTimeTotal", mon.timeUnpack.wall()}, {"unpackThroughput", FilterNan(mon.timeUnpack.throughput())}};
if (mon.tsDelta) {
fields.emplace_back("tsDelta", *mon.tsDelta);
......
......@@ -150,6 +150,8 @@ namespace cbm::algo
// Tracking
std::unique_ptr<TrackingChain> fTracking;
static double FilterNan(double x) { return std::isnan(x) || std::isinf(x) ? 0. : x; }
void Validate(const Options& opts);
template<class Unpacker>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment