CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 "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 204 of file SystemTimeKeeper.cc.

References cmsHarvester::index, and edmStreamStallGrapher::stream.

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