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

Unified Diff: tools/telemetry/unittest_data/interaction_enabled_page.html

Issue 477463002: All smoke test for timeline-based is_fast measurement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak the cpu_time comment. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/unittest_data/interaction_enabled_page.html
diff --git a/tools/telemetry/unittest_data/interaction_enabled_page.html b/tools/telemetry/unittest_data/interaction_enabled_page.html
index 67b7ded08dfb1ba840d78e75523035a786d483d6..bdce85abd935f4fff27209b5ff962b0f7db819b1 100644
--- a/tools/telemetry/unittest_data/interaction_enabled_page.html
+++ b/tools/telemetry/unittest_data/interaction_enabled_page.html
@@ -50,17 +50,28 @@
<script>
'use strict';
var jankMs = 100;
+ var slowMs = 200;
window.jankScriptDone = false;
- function makeJank() {
- console.time('Interaction.JankThreadJSRun/is_responsive');
+ window.slowScriptDone = false;
+ function waitMs(ms) {
var startTime = window.performance.now();
var currTime = startTime;
- while (currTime - startTime < jankMs) {
+ while (currTime - startTime < ms) {
var currTime = window.performance.now();
}
+ }
+ function makeJank() {
+ console.time('Interaction.JankThreadJSRun/is_responsive');
+ waitMs(jankMs);
console.timeEnd('Interaction.JankThreadJSRun/is_responsive');
window.jankScriptDone = true;
}
+ function makeSlow() {
+ console.time('Interaction.SlowThreadJsRun/is_fast');
+ waitMs(slowMs);
+ console.timeEnd('Interaction.SlowThreadJsRun/is_fast');
+ window.slowScriptDone = true;
+ }
</script>
</head>
@@ -77,6 +88,9 @@
<button type="button" id="jank-button" onclick="makeJank()">
Click or tap this to make jank of 100ms (approximately).
</div>
+ <button type="button" id="slow-button" onclick="makeSlow()">
+ Click or tap this to make wait 200ms (approximately).
+ </div>
</body>
</html>
« no previous file with comments | « tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698