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

Unified Diff: tracing/tracing/model/helpers/chrome_model_helper.html

Issue 2446423009: Normalize thread_times metric against the bounds of the browser process. (Closed)
Patch Set: Comments from nednguyen. 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 | « tracing/tracing/metrics/system_health/cpu_time_metric_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/helpers/chrome_model_helper.html
diff --git a/tracing/tracing/model/helpers/chrome_model_helper.html b/tracing/tracing/model/helpers/chrome_model_helper.html
index 5aee6578dfc475b1e51f57ad88622de0d94ce6f7..43444a23f1f831e799d934a2a18e37b9338a3518 100644
--- a/tracing/tracing/model/helpers/chrome_model_helper.html
+++ b/tracing/tracing/model/helpers/chrome_model_helper.html
@@ -138,6 +138,29 @@ tr.exportTo('tr.model.helpers', function() {
if (largestPid === -1) return undefined;
return this.rendererHelpers[largestPid];
+ },
+
+ // Returns the minimal bounds that includes all Chrome-related slices. This
+ // relies on the assumption that all Chrome-relevant traces are bounded by
+ // the browser process. Returns null if the minimal bounds could not be
+ // established.
+ get chromeBounds() {
+ if (!this.cachedChromeBounds_) {
+ var bounds = new tr.b.Range();
+
+ function updateBounds(process) {
+ for (var tid in process.threads) {
+ bounds.addRange(process.threads[tid].bounds);
+ }
+ }
+ for (var pid in this.browserHelpers) {
+ updateBounds(this.browserHelpers[pid].process);
+ }
+ this.cachedChromeBounds_ = bounds;
+ }
+ if (this.cachedChromeBounds_.isEmpty)
+ return null;
+ return this.cachedChromeBounds_;
}
};
« no previous file with comments | « tracing/tracing/metrics/system_health/cpu_time_metric_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698