Skip to content

Commit 495ffbe

Browse files
committed
Add timer for visualization cycle
1 parent 0f8c539 commit 495ffbe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

EventVisualisation/Workflow/src/O2DPLDisplay.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void O2DPLDisplaySpec::run(ProcessingContext& pc)
119119
}
120120

121121
// filtering out any run which occur before reaching next time interval
122-
std::chrono::time_point<std::chrono::high_resolution_clock> currentTime = std::chrono::high_resolution_clock::now();
122+
auto currentTime = std::chrono::high_resolution_clock::now();
123123
std::chrono::duration<double> elapsed = currentTime - this->mTimeStamp;
124124
if (elapsed < this->mTimeInteval) {
125125
return; // skip this run - it is too often
@@ -136,6 +136,9 @@ void O2DPLDisplaySpec::run(ProcessingContext& pc)
136136
helper.prepareMFTClusters(mMFTDict);
137137

138138
helper.draw(this->mJsonPath, this->mNumberOfFiles, this->mNumberOfTracks);
139+
const auto* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(pc.inputs().getFirstValid(true));
140+
auto endTime = std::chrono::high_resolution_clock::now();
141+
LOGP(INFO, "Visualization of TF:{} at orbit {} took {} s.", dh->tfCounter, dh->firstTForbit, std::chrono::duration_cast<std::chrono::microseconds>(endTime - currentTime).count() * 1e-6);
139142
}
140143

141144
void O2DPLDisplaySpec::endOfStream(EndOfStreamContext& ec)

0 commit comments

Comments
 (0)