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

Unified Diff: LayoutTests/inspector/tracing/timeline-js-callstacks.html

Issue 1293903002: DevTools: Nuke timeline costly functions flamechart experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update the test Created 5 years, 4 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 | LayoutTests/inspector/tracing/timeline-js-callstacks-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/tracing/timeline-js-callstacks.html
diff --git a/LayoutTests/inspector/tracing/timeline-js-callstacks.html b/LayoutTests/inspector/tracing/timeline-js-callstacks.html
index 2f0d3452e72fa0bc0b4778153563a6a540af8242..0377461a6398554fd74ea120a0b6b29a5fef6a4a 100644
--- a/LayoutTests/inspector/tracing/timeline-js-callstacks.html
+++ b/LayoutTests/inspector/tracing/timeline-js-callstacks.html
@@ -383,13 +383,25 @@ function test()
InspectorTest.addResult("");
tracingTimelineModel._setMainThreadEvents(events);
- var dataProvider = new WebInspector.TimelineFlameChartBottomUpDataProvider(tracingTimelineModel);
- dataProvider.setWindowTimes(0, Infinity);
- var timelineData = dataProvider.timelineData();
- for (var i = 0; i < timelineData.entryStartTimes.length; ++i) {
- var name = dataProvider.entryTitle(i);
- var padding = " ".repeat(timelineData.entryLevels[i]);
- InspectorTest.addResult(padding + name + ": " + timelineData.entryTotalTimes[i].toFixed(3) + " @ " + timelineData.entryStartTimes[i].toFixed(3));
+ var filters = [
+ WebInspector.TimelineUIUtils.hiddenEventsFilter(),
+ new WebInspector.ExcludeTopLevelFilter()
+ ];
+ var treeTopDown = WebInspector.TimelineUIUtils.buildTopDownTree(events, 0, Infinity, filters, eventId);
+ printProfileTree(0, treeTopDown);
+ var treeBottomUp = WebInspector.TimelineUIUtils.buildBottomUpTree(treeTopDown);
+ printProfileTree(0, treeBottomUp);
+
+ function eventId(event)
+ {
+ var data = event.args.data;
+ return data && (data.callUID || data.functionNode);
+ }
+
+ function printProfileTree(padding, node)
+ {
+ InspectorTest.addResult(" ".repeat(padding) + node.name + ": " + node.totalTime.toFixed(3));
+ (node.children || new Map()).forEach(printProfileTree.bind(null, padding + 1));
}
InspectorTest.completeTest();
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-js-callstacks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698