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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html

Issue 2262543002: DevTools: Profiler domain refactoring: encode timestamps as deltas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 4 landing Created 4 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
Index: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
index 693cdc8cbf76374ad3c5f4a01189ea334b01174b..d47098bdf86a4c39cc5123db8f6d52ab149ee6e7 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
@@ -929,16 +929,12 @@ function test()
}
};
var profile = profileAndExpectations._profile;
- var startTime = profile.startTime * 1000;
- var endTime = profile.endTime * 1000;
- profile.startTime /= 1000;
- profile.endTime /= 1000;
- var samplingInterval = (endTime - startTime) / (profile.samples.length - 1);
- profile.timestamps = [];
- for (var i = 0; i < profile.samples.length; ++i)
- profile.timestamps.push(startTime + i * samplingInterval);
- profileAndExpectations.target = function() {};
- profileAndExpectations.weakTarget = function() { return new WeakReference(null);};
+ profile.startTime *= 1000;
+ profile.endTime *= 1000;
+ var samplingInterval = (profile.endTime - profile.startTime) / (profile.samples.length - 1);
+ profile.timestampDeltas = Array.from(new Array(profile.samples.length), (x, i) => i ? samplingInterval : 0);
+ profileAndExpectations.target = () => {};
+ profileAndExpectations.weakTarget = () => new WeakReference(null);
var cpuProfileView = new WebInspector.CPUProfileView(profileAndExpectations);
cpuProfileView.viewSelectComboBox.setSelectedIndex(0);
cpuProfileView._changeView();

Powered by Google App Engine
This is Rietveld 408576698