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

Unified Diff: tools/perf/measurements/session_restore.py

Issue 317733002: [Telemetry] Make session restore benchmark not require arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | tools/telemetry/telemetry/core/browser_options.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/session_restore.py
diff --git a/tools/perf/measurements/session_restore.py b/tools/perf/measurements/session_restore.py
index ff210b4f3b66e2d1be4cf800ffb98b351ccb0f1e..b80bc681ee64337b34ecac8df83dde305b5a944e 100644
--- a/tools/perf/measurements/session_restore.py
+++ b/tools/perf/measurements/session_restore.py
@@ -1,13 +1,17 @@
# Copyright 2013 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 collections
+import logging
+import sys
from measurements import startup
from metrics import cpu
from metrics import startup_metric
from telemetry.core import util
+
class SessionRestore(startup.Startup):
"""Performs a measurement of Chromium's Session restore performance.
@@ -21,6 +25,14 @@ class SessionRestore(startup.Startup):
self.close_tabs_before_run = False
self._cpu_metric = None
+ @classmethod
+ def ProcessCommandLineArgs(cls, parser, args):
+ if not args.profile_dir:
+ logging.critical(
+ '--profile-dir or --profile-type is required for a session restore.\n'
+ 'For more information see: http://goo.gl/ngdGD5')
+ sys.exit(1)
dtu 2014/06/04 22:05:00 parser.error(message)
+
def CustomizeBrowserOptions(self, options):
super(SessionRestore, self).CustomizeBrowserOptions(options)
options.AppendExtraBrowserArgs([
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698