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

Unified Diff: tools/telemetry/examples/telemetry_perf_test.py

Issue 1111103002: [Telemetry] Move telemetry/examples to telemetry/experimental. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add examples/credentials_example.json back Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/examples/measure_trace.py ('k') | tools/telemetry/examples/top1k » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/examples/telemetry_perf_test.py
diff --git a/tools/telemetry/examples/telemetry_perf_test.py b/tools/telemetry/examples/telemetry_perf_test.py
deleted file mode 100755
index a23d1c9369371fc6dfa5862fc361bcf11bc80366..0000000000000000000000000000000000000000
--- a/tools/telemetry/examples/telemetry_perf_test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-import time
-
-sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
-
-from telemetry.core import browser_finder
-from telemetry.core import browser_options
-
-
-def Main(args):
- options = browser_options.BrowserFinderOptions()
- parser = options.CreateParser('telemetry_perf_test.py')
- options, args = parser.parse_args(args)
-
- browser_to_create = browser_finder.FindBrowser(options)
- assert browser_to_create
- with browser_to_create.Create(options) as b:
- tab = b.tabs[0]
-
- # Measure round-trip-time for evaluate
- times = []
- for i in range(1000):
- start = time.time()
- tab.EvaluateJavaScript('%i * 2' % i)
- times.append(time.time() - start)
- N = float(len(times))
- avg = sum(times, 0.0) / N
- squared_diffs = [(t - avg) * (t - avg) for t in times]
- stdev = sum(squared_diffs, 0.0) / (N - 1)
- times.sort()
- percentile_75 = times[int(0.75 * N)]
-
- print "%s: avg=%f; stdev=%f; min=%f; 75th percentile = %f" % (
- "Round trip time (seconds)",
- avg, stdev, min(times), percentile_75)
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv[1:]))
« no previous file with comments | « tools/telemetry/examples/measure_trace.py ('k') | tools/telemetry/examples/top1k » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698