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

Side by Side Diff: tools/callstats.html

Issue 2452013002: [tools] Filter out accidental group entries in callstats.html (Closed)
Patch Set: fixing typo Created 4 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 | 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 <html> 1 <html>
2 <!-- 2 <!--
3 Copyright 2016 the V8 project authors. All rights reserved. Use of this source 3 Copyright 2016 the V8 project authors. All rights reserved. Use of this source
4 code is governed by a BSD-style license that can be found in the LICENSE file. 4 code is governed by a BSD-style license that can be found in the LICENSE file.
5 --> 5 -->
6 6
7 <head> 7 <head>
8 <meta charset="UTF-8"> 8 <meta charset="UTF-8">
9 <style> 9 <style>
10 body { 10 body {
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 this.unclassified 1374 this.unclassified
1375 ]; 1375 ];
1376 this.entryDict = new Map(); 1376 this.entryDict = new Map();
1377 this.groups.forEach((entry) => { 1377 this.groups.forEach((entry) => {
1378 entry.page = this; 1378 entry.page = this;
1379 this.entryDict.set(entry.name, entry); 1379 this.entryDict.set(entry.name, entry);
1380 }); 1380 });
1381 this.version = version; 1381 this.version = version;
1382 } 1382 }
1383 add(entry) { 1383 add(entry) {
1384 // Ignore accidentally added Group entries.
1385 if (entry.name.startsWith(GroupedEntry.prefix)) return;
1384 entry.page = this; 1386 entry.page = this;
1385 this.entryDict.set(entry.name, entry); 1387 this.entryDict.set(entry.name, entry);
1386 var added = false; 1388 var added = false;
1387 this.groups.forEach((group) => { 1389 this.groups.forEach((group) => {
1388 if (!added) added = group.add(entry); 1390 if (!added) added = group.add(entry);
1389 }); 1391 });
1390 if (added) return; 1392 if (added) return;
1391 this.unclassified.push(entry); 1393 this.unclassified.push(entry);
1392 } 1394 }
1393 get(name) { 1395 get(name) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 Group.groups = new Map(); 1554 Group.groups = new Map();
1553 Group.add = function(name, group) { 1555 Group.add = function(name, group) {
1554 this.groups.set(name, group); 1556 this.groups.set(name, group);
1555 } 1557 }
1556 Group.add('total', new Group('Total', /.*Total.*/, '#BBB')); 1558 Group.add('total', new Group('Total', /.*Total.*/, '#BBB'));
1557 Group.add('ic', new Group('IC', /.*IC.*/, "#3366CC")); 1559 Group.add('ic', new Group('IC', /.*IC.*/, "#3366CC"));
1558 Group.add('optimize', new Group('Optimize', 1560 Group.add('optimize', new Group('Optimize',
1559 /StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/, "#DC3912")); 1561 /StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/, "#DC3912"));
1560 Group.add('compile', new Group('Compile', /.*Compile.*/, "#FFAA00")); 1562 Group.add('compile', new Group('Compile', /.*Compile.*/, "#FFAA00"));
1561 Group.add('parse', new Group('Parse', /.*Parse.*/, "#FF6600")); 1563 Group.add('parse', new Group('Parse', /.*Parse.*/, "#FF6600"));
1562 Group.add('callback', new Group('Callback', /.*Callback$/, "#109618")); 1564 Group.add('callback', new Group('Callback', /.*Callback.*/, "#109618"));
1563 Group.add('api', new Group('API', /.*API.*/, "#990099")); 1565 Group.add('api', new Group('API', /.*API.*/, "#990099"));
1564 Group.add('gc', new Group('GC', /GC|AllocateInTargetSpace/, "#0099C6")); 1566 Group.add('gc', new Group('GC', /GC|AllocateInTargetSpace/, "#0099C6"));
1565 Group.add('javascript', new Group('JavaScript', /JS_Execution/, "#DD4477")); 1567 Group.add('javascript', new Group('JavaScript', /JS_Execution/, "#DD4477"));
1566 Group.add('runtime', new Group('Runtime', /.*/, "#88BB00")); 1568 Group.add('runtime', new Group('Runtime', /.*/, "#88BB00"));
1567 Group.add('unclassified', new Group('Unclassified', /.*/, "#000")); 1569 Group.add('unclassified', new Group('Unclassified', /.*/, "#000"));
1568 1570
1569 class GroupedEntry extends Entry { 1571 class GroupedEntry extends Entry {
1570 constructor(group) { 1572 constructor(group) {
1571 super(0, 'Group-' + group.name, 0, 0, 0, 0, 0, 0); 1573 super(0, GroupedEntry.prefix + group.name, 0, 0, 0, 0, 0, 0);
1572 this.group = group; 1574 this.group = group;
1573 this.entries = []; 1575 this.entries = [];
1574 } 1576 }
1575 get regexp() { return this.group.regexp } 1577 get regexp() { return this.group.regexp }
1576 get color() { return this.group.color } 1578 get color() { return this.group.color }
1577 get enabled() { return this.group.enabled } 1579 get enabled() { return this.group.enabled }
1578 add(entry) { 1580 add(entry) {
1579 if (!this.regexp.test(entry.name)) return false; 1581 if (!this.regexp.test(entry.name)) return false;
1580 this._time += entry.time; 1582 this._time += entry.time;
1581 this._count += entry.count; 1583 this._count += entry.count;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 return Math.sqrt(sum); 1631 return Math.sqrt(sum);
1630 } 1632 }
1631 get timeVariancePercent() { 1633 get timeVariancePercent() {
1632 if (this._time == 0) return 0; 1634 if (this._time == 0) return 0;
1633 return this.getVarianceForProperty('time') / this._time * 100 1635 return this.getVarianceForProperty('time') / this._time * 100
1634 } 1636 }
1635 get timeVariance() { 1637 get timeVariance() {
1636 return this.getVarianceForProperty('time') 1638 return this.getVarianceForProperty('time')
1637 } 1639 }
1638 } 1640 }
1641 GroupedEntry.prefix = 'Group-';
1639 1642
1640 class UnclassifiedEntry extends GroupedEntry { 1643 class UnclassifiedEntry extends GroupedEntry {
1641 constructor(page) { 1644 constructor(page) {
1642 super(Group.groups.get('unclassified')); 1645 super(Group.groups.get('unclassified'));
1643 this.page = page; 1646 this.page = page;
1644 this._time = undefined; 1647 this._time = undefined;
1645 this._count = undefined; 1648 this._count = undefined;
1646 } 1649 }
1647 add(entry) { 1650 add(entry) {
1648 this.entries.push(entry); 1651 this.entries.push(entry);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 </tr> 1881 </tr>
1879 <tr> 1882 <tr>
1880 <td>Overall Impact:</td> 1883 <td>Overall Impact:</td>
1881 <td class="timeImpact"></td><td>±</td><td class="timePercentImpact"></td > 1884 <td class="timeImpact"></td><td>±</td><td class="timePercentImpact"></td >
1882 <td class="compare timeImpact"></td><td class="compare"> ± </td><td clas s="compare timePercentImpact"></td> 1885 <td class="compare timeImpact"></td><td class="compare"> ± </td><td clas s="compare timePercentImpact"></td>
1883 </tr> 1886 </tr>
1884 </table> 1887 </table>
1885 </div> 1888 </div>
1886 </body> 1889 </body>
1887 </html> 1890 </html>
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