6 #include "GaudiKernel/ISvcLocator.h"
7 #include "GaudiKernel/ConcurrencyFlags.h"
8 #include "GaudiKernel/EventContext.h"
26 size_t nslots = Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents();
31 ATH_MSG_INFO(
"initialize structures of size " << nslots);
37 m = std::make_unique<std::mutex>();
40 return StatusCode::SUCCESS;
50 std::map<std::string,unsigned int>
sum;
51 std::map<std::string,unsigned int> sumSq;
52 std::map<std::string,unsigned int>
num;
54 for (
const auto &ve :
m_times) {
55 for (
const auto &
e : ve) {
56 sum[
e.algName] +=
e.sleep_time;
57 sumSq[
e.algName] +=
e.sleep_time *
e.sleep_time;
62 info() <<
"listing timing by alg:";
63 for (
const auto &
s :
sum) {
66 info() <<
"\n " <<
s.first
67 <<
" avg: " <<
avg <<
" sig: " <<
sig;
71 return StatusCode::SUCCESS;
89 EventContext::ContextID_t slot = Gaudi::Hive::currentContextId();
90 std::lock_guard<std::mutex> lock ( *
m_locks[slot] );