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

algo: Fix metrics when monitor is not present.

parent ae62e371
Branches
Tags
1 merge request!1190algo: Fix metrics when monitor is not present.
Pipeline #22683 passed
......@@ -23,6 +23,7 @@ namespace cbm::algo
Monitor& GetMonitor() const
{
// Need Get-prefix to avoid conflict with Monitor-class name
if (!HasMonitor()) throw std::runtime_error("No monitor available");
return *gsl::make_not_null(fContext)->monitor;
}
......
......@@ -85,9 +85,11 @@ void Reco::Run(const fles::Timeslice& ts)
xpu::timings ts_times = xpu::pop_timer();
if (HasMonitor())
GetMonitor().QueueMetric("cbm_reco", {{"hostname", fles::system::current_hostname()}},
{{"tsProcessed", 1}, {"bytesProcessed", ts_utils::SizeBytes(ts)}});
PrintTimings(ts_times);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment