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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js

Issue 2490473006: [Devtools] Network Now has 100ms minimum rather than 1s for timelines (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
index e636795e0945608333f8b883b199ce9b1a2e900c..a3886c60b6615c6800132bb1bce7c8998e2d7472 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
@@ -295,12 +295,13 @@ WebInspector.NetworkTimeCalculator = class extends WebInspector.Object {
_extendBoundariesToIncludeTimestamp(timestamp) {
var previousMinimumBoundary = this._minimumBoundary;
var previousMaximumBoundary = this._maximumBoundary;
+ const minOffset = WebInspector.NetworkTimeCalculator._minimumSpread;
if (typeof this._minimumBoundary === 'undefined' || typeof this._maximumBoundary === 'undefined') {
this._minimumBoundary = timestamp;
- this._maximumBoundary = timestamp + 1;
+ this._maximumBoundary = timestamp + minOffset;
} else {
this._minimumBoundary = Math.min(timestamp, this._minimumBoundary);
- this._maximumBoundary = Math.max(timestamp, this._minimumBoundary + 1, this._maximumBoundary);
+ this._maximumBoundary = Math.max(timestamp, this._minimumBoundary + minOffset, this._maximumBoundary);
}
return previousMinimumBoundary !== this._minimumBoundary || previousMaximumBoundary !== this._maximumBoundary;
}
@@ -322,6 +323,8 @@ WebInspector.NetworkTimeCalculator = class extends WebInspector.Object {
}
};
+WebInspector.NetworkTimeCalculator._minimumSpread = 0.1;
+
/** @enum {symbol} */
WebInspector.NetworkTimeCalculator.Events = {
BoundariesChanged: Symbol('BoundariesChanged')
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698