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

Unified Diff: third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js

Issue 2858783003: Refactor prepareToMeasureValuesAsync to startMeasureValuesAsyn which run test through callback (Closed)
Patch Set: Address Xianzhu's review comments Created 3 years, 8 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
Index: third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js
diff --git a/third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js b/third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js
index 1db00f98a6c5017a099574fac088b64aa507c016..f44f460e8367c89c9fe1fe16857b234fb085b7ef 100644
--- a/third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js
+++ b/third_party/WebKit/PerformanceTests/Bindings/resources/structured-clone-perf-test.js
@@ -22,12 +22,13 @@ const StructuredClonePerfTestRunner = (function() {
return {
measureTimeAsync(test) {
let isDone = false;
- PerfTestRunner.prepareToMeasureValuesAsync({
+ PerfTestRunner.startMeasureValuesAsync({
description: test.description,
unit: 'ms',
warmUpCount: test.warmUpCount || 10,
iterationCount: test.iterationCount || 250,
done() { isDone = true; },
+ run: pingPongUntilDone,
});
function pingPongUntilDone() {
@@ -40,7 +41,6 @@ const StructuredClonePerfTestRunner = (function() {
if (!isDone) pingPongUntilDone();
});
}
- pingPongUntilDone();
},
};
})();

Powered by Google App Engine
This is Rietveld 408576698