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

Unified Diff: tracing/tracing/value/chart_json_converter.html

Issue 3008223002: Plumb traceUrls through ChartJsonConverter. (Closed)
Patch Set: Created 3 years, 3 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 | « telemetry/telemetry/value/trace.py ('k') | tracing/tracing/value/chart_json_converter_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/chart_json_converter.html
diff --git a/tracing/tracing/value/chart_json_converter.html b/tracing/tracing/value/chart_json_converter.html
index 0adef57d81a91660a8452ad41cb8d445f595e54b..715881aed7d6c3a1ea2520e4a2aa20930ee4f157 100644
--- a/tracing/tracing/value/chart_json_converter.html
+++ b/tracing/tracing/value/chart_json_converter.html
@@ -20,6 +20,7 @@ tr.exportTo('tr.v', function() {
* @param {!tr.v.HistogramSet} histograms
*/
static convertChartJson(charts, histograms) {
+ const traceValues = charts.charts.trace;
for (const [name, pageValues] of Object.entries(charts.charts)) {
if (name === 'trace') continue;
@@ -51,6 +52,18 @@ tr.exportTo('tr.v', function() {
hist.description = value.description || '';
histograms.addHistogram(hist);
+ if (traceValues) {
+ const traceValue = traceValues[storyName] || {};
+ let traceUrl = traceValue.cloud_url;
+ if (!traceUrl && traceValue.file_path) {
+ traceUrl = 'file://' + traceValue.file_path;
+ }
+ if (traceUrl) {
+ hist.diagnostics.set(tr.v.d.RESERVED_NAMES.TRACE_URLS,
+ new tr.v.d.GenericSet([traceUrl]));
+ }
+ }
+
if (pageValuesCount > 1) {
hist.diagnostics.set(tr.v.d.RESERVED_NAMES.STORIES,
new tr.v.d.GenericSet([storyName]));
« no previous file with comments | « telemetry/telemetry/value/trace.py ('k') | tracing/tracing/value/chart_json_converter_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698