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

Side by Side 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 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../resources/runner.js"></script> 3 <script src="../resources/runner.js"></script>
4 <script> 4 <script>
5 5
6 var log2Length = 23; 6 var times = 100000;
7 var str = "a";
8 for (var i = 0; i < log2Length; i++)
9 str = str + str;
10 var worker = new Worker('resources/worker.js'); 7 var worker = new Worker('resources/worker.js');
11 worker.onmessage = function(event) { 8 worker.onmessage = function(event) {
12 console.log("received"); 9 console.log("received");
13 }; 10 };
14 11
15 PerfTestRunner.measureTime({ 12 PerfTestRunner.measureTime({
16 description: "Measures performance of serializing a long string.", 13 description: "Measures performance of postMessage().",
17 run: function() { 14 run: function() {
18 worker.postMessage(str); 15 for (var i = 0; i < times; i++)
16 worker.postMessage('foo');
19 } 17 }
20 }); 18 });
21 </script> 19 </script>
22 </body> 20 </body>
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