tools/perf/core/benchmark_runner_test.py
def assertHasDiagnostic(self, hist, diag_info, value=None):
    """Assert that a histogram is associated with the given diagnostic."""
    self.assertIn(diag_info.name, hist.diagnostics)
    diag = hist.diagnostics[diag_info.name]
    self.assertIsInstance(
        diag, all_diagnostics.GetDiagnosticClassForName(diag_info.type))
    if value is not None:
      # Assume we expect singleton GenericSet with the given value.
      self.assertEqual(len(diag), 1)
      self.assertEqual(next(iter(diag)), value)
Assert that a histogram is associated with the given diagnostic.
Assert that a histogram is associated with the given diagnostic.
Assert that a histogram is associated with the given diagnostic .
def assertHasDiagnostic(self, hist, diag_info, value=None):
    self.assertIn(diag_info.name, hist.diagnostics)
    diag = hist.diagnostics[diag_info.name]
    self.assertIsInstance(
        diag, all_diagnostics.GetDiagnosticClassForName(diag_info.type))
    if value is not None:
      self.assertEqual(len(diag), 1)
      self.assertEqual(next(iter(diag)), value)
def assertHasDiagnostic ( self , hist , diag_info , value = None ) : self . assertIn ( diag_info . name , hist . diagnostics ) diag = hist . diagnostics [ diag_info . name ] self . assertIsInstance ( diag , all_diagnostics . GetDiagnosticClassForName ( diag_info . type ) ) if value is not None : self . assertEqual ( len ( diag ) , 1 ) self . assertEqual ( next ( iter ( diag ) ) , value )
Assert that a histogram is associated with the given diagnostic.
Assert that a histogram is associated with the given diagnostic .
"""Assert that a histogram is associated with the given diagnostic.""" # Assume we expect singleton GenericSet with the given value.
self
hist
diag_info
value