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

Side by Side Diff: third_party/WebKit/PerformanceTests/Paint/appending-text.html

Issue 2883603002: Use the new tracing based measurement for blink_perf.paint (Closed)
Patch Set: - Created 3 years, 7 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 | third_party/WebKit/PerformanceTests/Paint/color-changes.html » ('j') | 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 src="resources/paint.js"></script>
4 <div id="container"></div> 5 <div id="container"></div>
5 <script> 6 <script>
6 // This test measures the lifecycle update performance when adding small 7 // This test measures the lifecycle update performance when adding small
7 // amounts of text to a large page. 8 // amounts of text to a large page.
8 9
9 var initialTextCount = 20000; 10 var initialTextCount = 20000;
10 var initialText = ""; 11 var initialText = "";
11 for (var i = 0; i < initialTextCount; i++) 12 for (var i = 0; i < initialTextCount; i++)
12 initialText += '<span>a</span>'; 13 initialText += '<span>a</span>';
13 14
14 var textToAppendEachRun = 5; 15 var textToAppendEachRun = 5;
15 PerfTestRunner.measureFrameTime({ 16 measurePaint({
16 run: function() { 17 run: function() {
17 var text = document.createElement('span'); 18 var text = document.createElement('span');
18 text.innerText = 'abc'; 19 text.innerText = 'abc';
19 container.appendChild(text); 20 container.appendChild(text);
20 }, 21 },
21 setup: function() { 22 setup: function() {
22 container.innerHTML = initialText; 23 container.innerHTML = initialText;
23 }, 24 },
24 done: function() { 25 done: function() {
25 container.innerHTML = ""; 26 container.innerHTML = "";
26 }, 27 },
27 }); 28 });
28 </script> 29 </script>
29 </body> 30 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Paint/color-changes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698