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

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

Issue 2658143002: Create a trace import duration metric (Closed)
Patch Set: Created 3 years, 10 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
Index: tracing/tracing/metrics/tracing_metric.html
diff --git a/tracing/tracing/metrics/tracing_metric.html b/tracing/tracing/metrics/tracing_metric.html
index fa81c2f789f723de8626ef4a84a98e93813f8e25..4f8c2223046e781e69f73b8165f010396811c392 100644
--- a/tracing/tracing/metrics/tracing_metric.html
+++ b/tracing/tracing/metrics/tracing_metric.html
@@ -92,11 +92,16 @@ tr.exportTo('tr.metrics', function() {
histograms.addHistogram(traceBytesPerDumpValue);
}
+ // TODO(charliea): The metrics in this file should be renamed to have names
+ // more consistent with those in the rest of the codebase
+ // (e.g. 'trace_size_growth_rate' with a unit of bytes/second, not 'Max event
benjhayden 2017/02/17 16:48:55 This comment is fine as is, but I wanted to make a
charliea (OOO until 10-5) 2017/02/17 20:26:04 Hmmm, yea, you're completely right. I hadn't reall
+ // size in bytes per second').
+ // https://github.com/catapult-project/catapult/issues/3233
function tracingMetric(histograms, model) {
- if (!model.stats.hasEventSizesinBytes) {
- throw new Error('Model stats does not have event size information. ' +
- 'Please enable ImportOptions.trackDetailedModelStats.');
- }
+ addTimeDurationHistogram(
charliea (OOO until 10-5) 2017/02/17 16:16:58 As described above, I erred on the side of consist
+ 'trace_import_duration', model.stats.traceImportDurationMs, histograms);
+
+ if (!model.stats.hasEventSizesinBytes) return;
charliea (OOO until 10-5) 2017/02/17 16:16:58 This brings the metric more in line with other met
var eventStats = model.stats.allTraceEventStatsInTimeIntervals;
eventStats.sort(function(a, b) {
« no previous file with comments | « no previous file | tracing/tracing/metrics/tracing_metric_test.html » ('j') | tracing/tracing/metrics/tracing_metric_test.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698