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

Unified Diff: tracing/tracing/metrics/compare_samples_cmdline.html

Issue 2527263004: [bisect] - Have compare_samples check for missing "summary" tracename. (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 | tracing/tracing/metrics/compare_samples_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/compare_samples_cmdline.html
diff --git a/tracing/tracing/metrics/compare_samples_cmdline.html b/tracing/tracing/metrics/compare_samples_cmdline.html
index 3d9ce69d021868c339ae721047490ab1a077185d..ca5454e89775fe9a356d71a76df8dee38dea1ab7 100644
--- a/tracing/tracing/metrics/compare_samples_cmdline.html
+++ b/tracing/tracing/metrics/compare_samples_cmdline.html
@@ -47,6 +47,14 @@ function geoMeanFromHistogram(h) {
return Math.exp(sumOfLogs / count);
}
+function guessFullTIRMetricName(metricName) {
+ var parts = metricName.split('/');
+ if (parts.length === 2) {
+ return metricName + '/summary';
+ }
+ return undefined;
+}
+
function splitMetric(metricName) {
var parts = metricName.split('/');
var interactionName;
@@ -85,6 +93,19 @@ function valuesFromCharts(listOfCharts, metricName) {
return allValues;
}
+function valuesFromChartsWithFallback(listOfCharts, metricName) {
+ var allValues = valuesFromCharts(listOfCharts, metricName);
+ if (allValues.length > 0)
+ return allValues;
+
+ // If this had a tir_label, the "summary" part may have been stripped by
+ // the dashboard during upload. We can re-add it here.
+ var fullMetricName = guessFullTIRMetricName(metricName);
+ if (!fullMetricName)
+ return [];
+ return valuesFromCharts(listOfCharts, fullMetricName);
+}
+
function rawValuesByMetricName(valueSet, metricName) {
var interactionRecord;
var valueName;
@@ -249,8 +270,8 @@ var SampleComparison = {
var bPaths = chartPathListB.split(',');
var chartsA = parseFiles(aPaths);
var chartsB = parseFiles(bPaths);
- var sampleA = valuesFromCharts(chartsA, metric);
- var sampleB = valuesFromCharts(chartsB, metric);
+ var sampleA = valuesFromChartsWithFallback(chartsA, metric);
+ var sampleB = valuesFromChartsWithFallback(chartsB, metric);
return buildComparisonResultOutput(sampleA, sampleB);
}
« no previous file with comments | « no previous file | tracing/tracing/metrics/compare_samples_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698