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

Side by Side Diff: telemetry/telemetry/record_wpr.py

Issue 3003183002: Modify record_wpr to record benchmark once only (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import logging 6 import logging
7 import sys 7 import sys
8 8
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry import story 10 from telemetry import story
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 return has_benchmark_hint or has_story_hint 233 return has_benchmark_hint or has_story_hint
234 234
235 def Record(self, results): 235 def Record(self, results):
236 assert self._story_set.wpr_archive_info, ( 236 assert self._story_set.wpr_archive_info, (
237 'Pageset archive_data_file path must be specified.') 237 'Pageset archive_data_file path must be specified.')
238 if self._options.use_wpr_go: 238 if self._options.use_wpr_go:
239 print ('Recording now always use wpr_go, hence setting --use-wpr-go flag ' 239 print ('Recording now always use wpr_go, hence setting --use-wpr-go flag '
240 'explicitly is no longer necessary. Please file crbug against ' 240 'explicitly is no longer necessary. Please file crbug against '
241 'xunjeli@ & nednguyen@ if you encounter issue with recording.') 241 'xunjeli@ & nednguyen@ if you encounter issue with recording.')
242 242
243 # Always record the benchmark one time only.
244 self._options.pageset_repeat = 1
243 self._story_set.wpr_archive_info.is_using_wpr_go_archives = True 245 self._story_set.wpr_archive_info.is_using_wpr_go_archives = True
244 self._story_set.wpr_archive_info.AddNewTemporaryRecording() 246 self._story_set.wpr_archive_info.AddNewTemporaryRecording()
245 self._record_page_test.CustomizeBrowserOptions(self._options) 247 self._record_page_test.CustomizeBrowserOptions(self._options)
246 story_runner.Run( 248 story_runner.Run(
247 self._record_page_test, 249 self._record_page_test,
248 self._story_set, 250 self._story_set,
249 self._options, 251 self._options,
250 results, 252 results,
251 expectations=self._expectations, 253 expectations=self._expectations,
252 metadata=self._CreateBenchmarkMetadata()) 254 metadata=self._CreateBenchmarkMetadata())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 binary_manager.InitDependencyManager(environment.client_configs) 306 binary_manager.InitDependencyManager(environment.client_configs)
305 307
306 # TODO(nednguyen): update WprRecorder so that it handles the difference 308 # TODO(nednguyen): update WprRecorder so that it handles the difference
307 # between recording a benchmark vs recording a story better based on 309 # between recording a benchmark vs recording a story better based on
308 # the distinction between args.benchmark & args.story 310 # the distinction between args.benchmark & args.story
309 wpr_recorder = WprRecorder(environment.top_level_dir, target, extra_args) 311 wpr_recorder = WprRecorder(environment.top_level_dir, target, extra_args)
310 results = wpr_recorder.CreateResults() 312 results = wpr_recorder.CreateResults()
311 wpr_recorder.Record(results) 313 wpr_recorder.Record(results)
312 wpr_recorder.HandleResults(results, args.upload) 314 wpr_recorder.HandleResults(results, args.upload)
313 return min(255, len(results.failures)) 315 return min(255, len(results.failures))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698