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

Unified Diff: tracing/tracing/metrics/system_health/long_tasks_metric.html

Issue 2258583003: Modernize DiagnosticMap to subclass ES6 Map. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix longTasksMetric and Composition Created 4 years, 4 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/system_health/long_tasks_metric.html
diff --git a/tracing/tracing/metrics/system_health/long_tasks_metric.html b/tracing/tracing/metrics/system_health/long_tasks_metric.html
index ca10f7eb90798597f8c1c6bbd79e41e22c7391a8..9782488bd5fe90fad9135de4b38370d3f716f9a2 100644
--- a/tracing/tracing/metrics/system_health/long_tasks_metric.html
+++ b/tracing/tracing/metrics/system_health/long_tasks_metric.html
@@ -94,8 +94,7 @@ tr.exportTo('tr.metrics.sh', function() {
iterateRendererMainThreads(model, function(thread) {
iterateLongTopLevelTasksOnThreadInRange(
thread, rangeOfInterest, function(task) {
- longTaskNumeric.add(task.duration,
- new tr.v.d.DiagnosticMap({
+ longTaskNumeric.add(task.duration, tr.v.d.DiagnosticMap.fromObject({
relatedEvents: new tr.v.d.RelatedEventSet([task])}));
slices.push(task);
slices.addEventSet(task.descendentSlices);
@@ -110,7 +109,7 @@ tr.exportTo('tr.metrics.sh', function() {
e => (model.getUserFriendlyCategoryFromEvent(e) || 'unknown'));
composition.colorScheme =
tr.v.d.COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER;
- longTaskValue.diagnostics.add('category', composition);
+ longTaskValue.diagnostics.set('category', composition);
}
tr.metrics.MetricRegistry.register(longTasksMetric, {

Powered by Google App Engine
This is Rietveld 408576698