MCPcopy Create free account
hub / github.com/nodejs/node / ConsumeOutput

Method ConsumeOutput

deps/v8/tools/run_perf.py:525–554  ·  view source on GitHub ↗

Processes test run output and updates result tracker. Args: output: Output object from the test run. result_tracker: ResultTracker object to be updated. count: Index of the test run (used for better logging).

(self, output, result_tracker)

Source from the content-addressed store, hash-verified

523 """
524
525 def ConsumeOutput(self, output, result_tracker):
526 """Processes test run output and updates result tracker.
527
528 Args:
529 output: Output object from the test run.
530 result_tracker: ResultTracker object to be updated.
531 count: Index of the test run (used for better logging).
532 """
533 results_for_total = []
534 for trace in self.children:
535 result = trace.ConsumeOutput(output, result_tracker)
536 if result is not None:
537 results_for_total.append(result)
538
539 if self.total:
540 # Produce total metric only when all traces have produced results.
541 if len(self.children) != len(results_for_total):
542 result_tracker.AddError(
543 'Not all traces have produced results. Can not compute total for '
544 '%s.' % self.name)
545 return
546
547 # Calculate total as a the geometric mean for results from all traces.
548 total_trace = LeafTraceConfig(
549 {
550 'name': 'Total',
551 'units': self.children[0].units
552 }, self, self.arch)
553 result_tracker.AddTraceResult(total_trace,
554 GeometricMean(results_for_total), '')
555
556 def AppendChild(self, node):
557 if node.__class__ not in (TraceConfig, LeafTraceConfig):

Callers 3

ConsumeOutputMethod · 0.45
ProcessOutputMethod · 0.45
ProcessOutputMethod · 0.45

Calls 5

LeafTraceConfigClass · 0.85
AddErrorMethod · 0.80
AddTraceResultMethod · 0.80
GeometricMeanFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected