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

Unified Diff: third_party/WebKit/PerformanceTests/Bindings/post-message.html

Issue 1871463002: [Binding][Performance]Add a new performance benchmark for postMessge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Bindings/post-message.html
diff --git a/third_party/WebKit/PerformanceTests/Bindings/serialize-long-string.html b/third_party/WebKit/PerformanceTests/Bindings/post-message.html
similarity index 58%
copy from third_party/WebKit/PerformanceTests/Bindings/serialize-long-string.html
copy to third_party/WebKit/PerformanceTests/Bindings/post-message.html
index 6018a386f172dde3195c900d17390f975eb7a13e..862aa8249a2417c7cb887b212378593d5bac1c57 100644
--- a/third_party/WebKit/PerformanceTests/Bindings/serialize-long-string.html
+++ b/third_party/WebKit/PerformanceTests/Bindings/post-message.html
@@ -3,19 +3,17 @@
<script src="../resources/runner.js"></script>
<script>
-var log2Length = 23;
-var str = "a";
-for (var i = 0; i < log2Length; i++)
- str = str + str;
+var times = 100000;
var worker = new Worker('resources/worker.js');
worker.onmessage = function(event) {
console.log("received");
};
PerfTestRunner.measureTime({
- description: "Measures performance of serializing a long string.",
+ description: "Measures performance of postMessage().",
run: function() {
- worker.postMessage(str);
+ for (var i = 0; i < times; i++)
+ worker.postMessage('foo');
}
});
</script>
« 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