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

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

Issue 2323533003: [Not for landing - CL being split] Add Estimated Input Latency - EQT 90th Percentile definition
Patch Set: List -> Plural Created 4 years, 2 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 | « tracing/tracing/metrics/system_health/loading_metric.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 51b762abb3ca39b6423e2dfe3c3da2be5cb35a23..4d6b5040a584d89897c3c5d527c6a3f64c953514 100644
--- a/tracing/tracing/model/helpers/chrome_model_helper.html
+++ b/tracing/tracing/model/helpers/chrome_model_helper.html
@@ -114,6 +114,33 @@ tr.exportTo('tr.model.helpers', function() {
get rendererHelpers() {
return this.rendererHelpers_;
+ },
+
+
+ /**
+ * Returns renderer with largest pid that is not chrome tracing ui.
+ *
+ * This is a very hacky approach to find the "target" renderer in metrics
+ * calculation. Often in telemetry tests we are only interested in
+ * calculating metrics for the page opened by the automated testing system,
+ * but currently in tbmv2 there is no way to reliably single out this
+ * renderer. One useful heuristic is that the page telemetry opens is opened
+ * after all the other renderers in chrome were opened, and therefore has
+ * the largest pid.
+ *
+ * TODO: Remove this after #2820 is resolved.
+ */
+ get rendererWithLargestPid() {
+ var largestPid = -1;
+ for (var pid in this.rendererHelpers) {
+ var rendererHelper = this.rendererHelpers[pid];
+ if (rendererHelper.isChromeTracingUI) continue;
+ if (pid > largestPid) largestPid = pid;
+ }
+
+ if (largestPid === -1) return undefined;
+
+ return this.rendererHelpers[largestPid];
}
};
« no previous file with comments | « tracing/tracing/metrics/system_health/loading_metric.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698