Definition at line 28 of file ConcurrentModuleTimer.cc.
◆ ConcurrentModuleTimer()
Definition at line 68 of file ConcurrentModuleTimer.cc.
69 :
m_modulesToExclude(iConfig.getUntrackedParameter<std::vector<std::string>>(
"modulesToExclude")),
76 iReg.watchPreModuleConstruction([
this](ModuleDescription
const& iMod) {
78 if (iMod.moduleLabel() ==
name) {
84 iReg.watchPreModuleEvent([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
89 iReg.watchPostModuleEvent([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
95 iReg.watchPreModuleEventDelayedGet([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
102 iReg.watchPostModuleEventDelayedGet([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
112 iReg.watchPreModuleEvent([
this](StreamContext
const&, ModuleCallingContext
const&) {
start(); });
113 iReg.watchPostModuleEvent([
this](StreamContext
const&, ModuleCallingContext
const&) {
stop(); });
115 iReg.watchPreModuleEventDelayedGet([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
120 iReg.watchPostModuleEventDelayedGet([
this](StreamContext
const&, ModuleCallingContext
const& iContext) {
135 iReg.watchPreSourceEvent([
this](StreamID) {
145 iReg.watchPostSourceEvent([
this](StreamID) {
stop(); });
◆ ~ConcurrentModuleTimer()
ConcurrentModuleTimer::~ConcurrentModuleTimer |
( |
| ) |
|
◆ fillDescriptions()
◆ start()
void ConcurrentModuleTimer::start |
( |
| ) |
|
|
private |
Definition at line 176 of file ConcurrentModuleTimer.cc.
178 std::chrono::high_resolution_clock::time_point oldTime;
179 bool expected =
false;
180 unsigned int nModules;
181 while (not
m_spinLock.compare_exchange_strong(expected,
true, std::memory_order_acq_rel)) {
188 m_spinLock.store(
false, std::memory_order_release);
191 auto diff = newTime - oldTime;
192 for (
unsigned int i = 0;
i < nModules; ++
i) {
References cms::cuda::assert(), change_name::diff, mps_fire::i, m_nModules, m_nTimeSums, m_spinLock, m_time, m_timeSums, and fileCollector::now.
Referenced by progressbar.ProgressBar::__next__().
◆ stop()
void ConcurrentModuleTimer::stop |
( |
| ) |
|
|
private |
Definition at line 197 of file ConcurrentModuleTimer.cc.
199 std::chrono::high_resolution_clock::time_point oldTime;
200 bool expected =
false;
201 unsigned int nModules;
202 while (not
m_spinLock.compare_exchange_weak(expected,
true, std::memory_order_acq_rel)) {
209 m_spinLock.store(
false, std::memory_order_release);
212 auto diff = newTime - oldTime;
213 for (
unsigned int i = 0;
i <= nModules; ++
i) {
References cms::cuda::assert(), change_name::diff, mps_fire::i, m_nModules, m_nTimeSums, m_spinLock, m_time, m_timeSums, and fileCollector::now.
◆ trackModule()
◆ m_excludedModuleIds
std::vector<unsigned int> edm::service::ConcurrentModuleTimer::m_excludedModuleIds |
|
private |
◆ m_excludeSource
bool edm::service::ConcurrentModuleTimer::m_excludeSource |
|
private |
◆ m_modulesToExclude
std::vector<std::string> edm::service::ConcurrentModuleTimer::m_modulesToExclude |
|
private |
◆ m_nModules
unsigned int edm::service::ConcurrentModuleTimer::m_nModules |
|
private |
◆ m_nTimeSums
unsigned int edm::service::ConcurrentModuleTimer::m_nTimeSums = 0 |
|
private |
◆ m_spinLock
std::atomic<bool> edm::service::ConcurrentModuleTimer::m_spinLock |
|
private |
◆ m_startedTiming
bool edm::service::ConcurrentModuleTimer::m_startedTiming |
|
private |
◆ m_time
std::chrono::high_resolution_clock::time_point edm::service::ConcurrentModuleTimer::m_time |
|
private |
◆ m_timeSums
std::unique_ptr<std::atomic<std::chrono::high_resolution_clock::rep>[]> edm::service::ConcurrentModuleTimer::m_timeSums |
|
private |