#include <BenchmarkRecorder.h>
Definition at line 58 of file BenchmarkRecorder.h.
◆ BenchmarkRecorder() [1/3]
podio::benchmark::BenchmarkRecorder::BenchmarkRecorder |
( |
| ) |
|
|
delete |
◆ BenchmarkRecorder() [2/3]
podio::benchmark::BenchmarkRecorder::BenchmarkRecorder |
( |
const std::string & |
recFileName = "podio_benchmark_file.root" | ) |
|
|
inline |
Definition at line 61 of file BenchmarkRecorder.h.
61 {
62 m_recordFile = new TFile(recFileName.c_str(), "recreate");
63 }
◆ BenchmarkRecorder() [3/3]
◆ ~BenchmarkRecorder()
podio::benchmark::BenchmarkRecorder::~BenchmarkRecorder |
( |
| ) |
|
|
inline |
Definition at line 68 of file BenchmarkRecorder.h.
68 {
69 for (auto& tree : m_recordTrees) {
70 tree.second.Write();
71 }
72 m_recordFile->Write("", TObject::kWriteDelete);
73 m_recordFile->Close();
74 }
◆ addTree()
BenchmarkRecorderTree & podio::benchmark::BenchmarkRecorder::addTree |
( |
const std::string & |
name, |
|
|
const std::vector< std::string > & |
steps |
|
) |
| |
|
inline |
Definition at line 90 of file BenchmarkRecorder.h.
90 {
91 return m_recordTrees
92 .emplace_back(std::piecewise_construct, std::forward_as_tuple(name),
93 std::forward_as_tuple(m_recordFile, name, steps))
94 .second;
95 }
◆ Fill()
void podio::benchmark::BenchmarkRecorder::Fill |
( |
const std::string & |
treeName | ) |
|
|
inline |
◆ operator=()
◆ recordTime()
template<typename TimingResolution = std::chrono::nanoseconds>
void podio::benchmark::BenchmarkRecorder::recordTime |
( |
const std::string & |
treeName, |
|
|
const std::string & |
stepName, |
|
|
const ClockT::duration |
time |
|
) |
| |
|
inline |
Definition at line 77 of file BenchmarkRecorder.h.
77 {
78 auto it = std::find_if(m_recordTrees.begin(), m_recordTrees.end(),
79 [&treeName](const auto& recTree) { return recTree.first == treeName; });
80
81 it->second.template recordTime<TimingResolution>(stepName, time);
82 }
The documentation for this class was generated from the following file: