Exemplo n.º 1
0
  def test_parse_measurement_results_typical(self):
    """Tests parsing typical output with unrelated log entries."""
    output = """
[INFO:network_fetcher.cc(322)] Caching mojo app http://127.0.0.1:31839/benchmark.mojo at /usr/local/google/home/user/.mojo_url_response_disk_cache/cache/4F6FAE752C7958AE122C6A2D778F2014C15578250B3C6746D54B99E4F15A4458/4F6FAE752C7958AE122C6A2D778F2014C15578250B3C6746D54B99E4F15A4458
[INFO:network_fetcher.cc(322)] Caching mojo app http://127.0.0.1:31839/dart_traced_application.mojo at /usr/local/google/home/user/.mojo_url_response_disk_cache/cache/AB290478907A1DC5434CBCFD053BE2E74254D882644E76B3C28E3E7E1BCDCC3D/AB290478907A1DC5434CBCFD053BE2E74254D882644E76B3C28E3E7E1BCDCC3D
Observatory listening on http://127.0.0.1:38128
[1109/155613:WARNING:event.cc(234)] Ignoring incorrect complete event (no duration)
measurement: time_until/a/b 42.5
measurement: time_between/a/b/c/d 21.1
measurement: time_between/a/b/e/f FAILED
some measurements failed
"""
    results = benchmark._parse_measurement_results(output)
    self.assertEquals({'time_until/a/b': 42.5,
                       'time_between/a/b/c/d': 21.1}, results)
Exemplo n.º 2
0
    def test_parse_measurement_results_typical(self):
        """Tests parsing typical output with unrelated log entries."""
        output = """
[INFO:network_fetcher.cc(322)] Caching mojo app http://127.0.0.1:31839/benchmark.mojo at /usr/local/google/home/user/.mojo_url_response_disk_cache/cache/4F6FAE752C7958AE122C6A2D778F2014C15578250B3C6746D54B99E4F15A4458/4F6FAE752C7958AE122C6A2D778F2014C15578250B3C6746D54B99E4F15A4458
[INFO:network_fetcher.cc(322)] Caching mojo app http://127.0.0.1:31839/dart_traced_application.mojo at /usr/local/google/home/user/.mojo_url_response_disk_cache/cache/AB290478907A1DC5434CBCFD053BE2E74254D882644E76B3C28E3E7E1BCDCC3D/AB290478907A1DC5434CBCFD053BE2E74254D882644E76B3C28E3E7E1BCDCC3D
Observatory listening on http://127.0.0.1:38128
[1109/155613:WARNING:event.cc(234)] Ignoring incorrect complete event (no duration)
measurement: time_until/a/b 42.5
measurement: time_between/a/b/c/d 21.1
measurement: time_between/a/b/e/f FAILED
some measurements failed
"""
        results = benchmark._parse_measurement_results(output)
        self.assertEquals(
            {
                'time_until/a/b': 42.5,
                'time_between/a/b/c/d': 21.1
            }, results)
Exemplo n.º 3
0
 def test_parse_measurement_results_empty(self):
     """Tests parsing empty output."""
     output = """"""
     results = benchmark._parse_measurement_results(output)
     self.assertEquals({}, results)
Exemplo n.º 4
0
 def test_parse_measurement_results_empty(self):
   """Tests parsing empty output."""
   output = """"""
   results = benchmark._parse_measurement_results(output)
   self.assertEquals({}, results)