MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / totalTime

Function totalTime

lib/models/instrumentation.js:300–334  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

298}
299
300function totalTime(tree) {
301 let totalTime = 0;
302 let nodeItr;
303 let node;
304 let statName;
305 let statValue;
306 let statsItr;
307 let nextNode;
308 let nextStat;
309
310 for (nodeItr = tree.dfsIterator(); ; ) {
311 nextNode = nodeItr.next();
312 if (nextNode.done) {
313 break;
314 }
315
316 node = nextNode.value;
317
318 for (statsItr = node.statsIterator(); ; ) {
319 nextStat = statsItr.next();
320 if (nextStat.done) {
321 break;
322 }
323
324 statName = nextStat.value[0];
325 statValue = nextStat.value[1];
326
327 if (statName === 'time.self') {
328 totalTime += statValue;
329 }
330 }
331 }
332
333 return totalTime;
334}
335
336// exported for testing
337Instrumentation._enableFSMonitorIfInstrumentationEnabled = _enableFSMonitorIfInstrumentationEnabled;

Callers 3

_initSummaryMethod · 0.85
_commandSummaryMethod · 0.85
_shutdownSummaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…