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

Side by Side Diff: sky/benchmarks/layout/simple-blocks.html

Issue 701813004: Add a microbenchmark for simple block layout (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fixenated Created 6 years, 1 month 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 | sky/benchmarks/resources/runner.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <sky>
2 <import src="../resources/runner.sky" as="PerfRunner" />
3 <style>
4 div {
5 height: 10px;
6 }
7 span {
8 display: inline;
9 }
10 </style>
11 <div id='content'></div>
12 <script>
13 var content = document.getElementById('content');
14
15 var out = [];
16 for (var i = 0; i < 1000; i++) {
17 var div = document.createElement('div');
18 div.appendChild(document.createElement('span')).appendChild(document.createTex tNode('foo'));
19 div.appendChild(document.createTextNode(' '));
20 div.appendChild(document.createElement('span')).appendChild(document.createTex tNode('bar'));
21 content.appendChild(div);
22 }
23
24 var b = document.querySelector('sky');
25
26 var runner = new PerfRunner({
27 setup: function() {
28 b.style.width = '210px';
29 getComputedStyle(b).color;
30 b.offsetHeight;
31
32 b.style.width = '200px';
33 getComputedStyle(b).color;
34 },
35 iterations: 10,
36 unit: 'ms',
37 });
38
39 runner.runAsync(function(done) {
40 b.offsetHeight;
41 done();
42 });
43 </script>
44 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/benchmarks/resources/runner.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698