1 # Copyright (c) 2012 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 from telemetry
.core
import util
5 from telemetry
.page
import page_benchmark
7 class RobohornetPro(page_benchmark
.PageBenchmark
):
8 def CustomizeBrowserOptions(self
, options
):
9 # Benchmark require use of real Date.now() for measurement.
10 options
.wpr_make_javascript_deterministic
= False
12 def MeasurePage(self
, _
, tab
, results
):
13 tab
.ExecuteJavaScript('ToggleRoboHornet()')
15 done
= 'document.getElementById("results").innerHTML.indexOf("Total") != -1'
17 return tab
.EvaluateJavaScript(done
)
18 util
.WaitFor(_IsDone
, 60)
20 result
= int(tab
.EvaluateJavaScript('stopTime - startTime'))
21 results
.Add('Total', 'ms', result
)