CMS 3D CMS Logo

Functions
SystemTimeKeeper.cc File Reference
#include <algorithm>
#include "FWCore/Utilities/interface/StreamID.h"
#include "FWCore/ServiceRegistry/interface/StreamContext.h"
#include "FWCore/ServiceRegistry/interface/PathContext.h"
#include "FWCore/ServiceRegistry/interface/PlaceInPathContext.h"
#include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
#include "DataFormats/Provenance/interface/ModuleDescription.h"
#include "DataFormats/Common/interface/HLTPathStatus.h"
#include "FWCore/Framework/interface/TriggerTimingReport.h"
#include "FWCore/Framework/interface/TriggerNamesService.h"
#include "FWCore/Utilities/interface/Algorithms.h"
#include "SystemTimeKeeper.h"

Go to the source code of this file.

Functions

static void fillPathSummary (unsigned int iStartIndex, unsigned int iEndIndex, std::vector< std::string > const &iPathNames, std::vector< std::vector< std::string >> const &iModulesOnPaths, std::vector< std::vector< SystemTimeKeeper::PathTiming >> const &iPathTimings, std::vector< PathTimingSummary > &iSummary)
 

Function Documentation

static void fillPathSummary ( unsigned int  iStartIndex,
unsigned int  iEndIndex,
std::vector< std::string > const &  iPathNames,
std::vector< std::vector< std::string >> const &  iModulesOnPaths,
std::vector< std::vector< SystemTimeKeeper::PathTiming >> const &  iPathTimings,
std::vector< PathTimingSummary > &  iSummary 
)
static

Definition at line 197 of file SystemTimeKeeper.cc.

References edm::SystemTimeKeeper::PathTiming::m_moduleTiming, edm::SystemTimeKeeper::PathTiming::m_timer, edm::SystemTimeKeeper::pathTiming(), and edm::WallclockTimer::realTime().

202  {
203  iSummary.resize(iEndIndex - iStartIndex);
204 
205  for (auto const& stream : iPathTimings) {
206  auto it = iSummary.begin();
207  for (unsigned int index = iStartIndex; index < iEndIndex; ++index, ++it) {
208  auto const& pathTiming = stream[index];
209  it->name = iPathNames[index];
210  it->bitPosition = index - iStartIndex;
211  if (not pathTiming.m_moduleTiming.empty()) {
212  it->timesRun += pathTiming.m_moduleTiming[0].m_timesVisited;
213  }
214  it->realTime += pathTiming.m_timer.realTime();
215  if (it->moduleInPathSummaries.empty()) {
216  it->moduleInPathSummaries.resize(pathTiming.m_moduleTiming.size());
217  }
218  for (unsigned int modIndex = 0; modIndex < pathTiming.m_moduleTiming.size(); ++modIndex) {
219  auto const& modTiming = pathTiming.m_moduleTiming[modIndex];
220  auto& modSummary = it->moduleInPathSummaries[modIndex];
221  if (modSummary.moduleLabel.empty()) {
222  modSummary.moduleLabel = iModulesOnPaths[index][modIndex];
223  }
224  modSummary.timesVisited += modTiming.m_timesVisited;
225  modSummary.realTime += modTiming.m_realTime;
226  }
227  }
228  }
229 }