33 return iLHS->
id() < iRHS->
id();
48 std::vector<const ModuleDescription*>
const& iModules,
51 : m_streamEventTimer(iNumStreams),
52 m_streamPathTiming(iNumStreams),
54 m_processContext(iProcessContext),
63 stream.resize(numModuleSlots);
67 std::vector<unsigned int> numModulesInPath;
68 std::vector<unsigned int> numModulesInEndPath;
70 const unsigned int numPaths = iNamesService.
getTrigPaths().size();
71 const unsigned int numEndPaths = iNamesService.
getEndPaths().size();
76 numModulesInPath.reserve(numPaths);
77 numModulesInEndPath.reserve(numEndPaths);
81 for (
unsigned int i = 0;
i < numPaths; ++
i) {
85 for (
unsigned int i = 0;
i < numEndPaths; ++
i) {
93 unsigned int index = 0;
94 stream.resize(numModulesInPath.size() + numModulesInEndPath.size());
95 for (
unsigned int numMods : numModulesInPath) {
99 for (
unsigned int numMods : numModulesInEndPath) {
158 auto& modsOnPath =
timing.m_moduleTiming;
159 for (
unsigned int i = 0;
i < iStatus.
index() + 1; ++
i) {
160 ++modsOnPath[
i].m_timesVisited;
175 auto times =
mod.m_timer.stop();
181 modTiming.m_realTime += times;
188 auto times =
mod.m_timer.stop();
194 modTiming.m_realTime += times;
210 unsigned int iEndIndex,
211 std::vector<std::string>
const& iPathNames,
212 std::vector<std::vector<std::string>>
const& iModulesOnPaths,
213 std::vector<std::vector<SystemTimeKeeper::PathTiming>>
const& iPathTimings,
214 std::vector<PathTimingSummary>& iSummary) {
215 iSummary.resize(iEndIndex - iStartIndex);
217 for (
auto const&
stream : iPathTimings) {
218 auto it = iSummary.begin();
219 for (
unsigned int index = iStartIndex;
index < iEndIndex; ++
index, ++it) {
221 it->name = iPathNames[
index];
222 it->bitPosition =
index - iStartIndex;
223 if (not pathTiming.m_moduleTiming.empty()) {
224 it->timesRun += pathTiming.m_moduleTiming[0].m_timesVisited;
226 it->realTime += pathTiming.m_timer.realTime();
227 if (it->moduleInPathSummaries.empty()) {
228 it->moduleInPathSummaries.resize(pathTiming.m_moduleTiming.size());
230 for (
unsigned int modIndex = 0; modIndex < pathTiming.m_moduleTiming.size(); ++modIndex) {
231 auto const& modTiming = pathTiming.m_moduleTiming[modIndex];
232 auto& modSummary = it->moduleInPathSummaries[modIndex];
233 if (modSummary.moduleLabel.empty()) {
234 modSummary.moduleLabel = iModulesOnPaths[
index][modIndex];
236 modSummary.timesVisited += modTiming.m_timesVisited;
237 modSummary.realTime += modTiming.m_realTime;
246 double sumEventTime = 0.;
248 sumEventTime +=
stream.realTime();
252 rep.eventSummary.sumStreamRealTime = sumEventTime;
260 std::map<std::string, unsigned int>
visited;
262 unsigned int pathIndex = 0;
264 unsigned int modIndex = 0;
265 for (
auto const&
mod :
path.m_moduleTiming) {
273 unsigned int modIndex = 0;
275 auto& outMod =
summary[modIndex];
276 outMod.moduleLabel =
mod->moduleLabel();
277 outMod.realTime = 0.;
282 outMod.realTime +=
timing.m_timer.realTime();
283 outMod.timesRun +=
timing.m_timesRun;
285 outMod.timesVisited =
visited[
mod->moduleLabel()];
286 if (0 == outMod.timesVisited) {
287 outMod.timesVisited = outMod.timesRun;
302 rep.endPathSummaries);