Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: tools/perf/measurements/loading_measurement_analyzer_unittest.py

Issue 661653003: telemetry: Delete loading measurement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import os
5 import StringIO
6 import unittest
7
8 from measurements import loading_measurement_analyzer
9 from telemetry.core import util
10
11 class LoadingMeasurementAnalyzerUnitTest(unittest.TestCase):
12
13 # TODO(tonyg): Remove this backfill when we can assume python 2.7 everywhere.
14 def assertIn(self, first, second, _=None):
15 self.assertTrue(first in second,
16 msg="'%s' not found in '%s'" % (first, second))
17
18 def testLoadingProfile(self):
19 output = StringIO.StringIO()
20 csv_path = os.path.join(
21 util.GetChromiumSrcDir(),
22 'tools', 'perf', 'measurements','test_data', 'loading_profile.csv')
23 loading_measurement_analyzer.main([csv_path], stdout=output)
24 output = output.getvalue()
25
26 # Get the summary right.
27 self.assertIn('Total URLs: 9', output)
28 self.assertIn('Total page load time: 51s', output)
29 self.assertIn('Average page load time: 5621ms', output)
30
31 # Spot check a few samples.
32 self.assertIn('WTF::IntHash::hash: 1359797948period 1.1%', output)
33 self.assertIn('WebCore::rangesIntersect: 648335678period 0.5%', output)
34 self.assertIn('v8::internal::Scanner::Scan: 19668346period 0.0', output)
OLDNEW
« no previous file with comments | « tools/perf/measurements/loading_measurement_analyzer.py ('k') | tools/perf/measurements/loading_trace.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698