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

Unified Diff: trace_processor/experimental/mappers/task_info_map_function.html

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | trace_processor/experimental/mappers/trace_stats.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trace_processor/experimental/mappers/task_info_map_function.html
diff --git a/trace_processor/experimental/mappers/task_info_map_function.html b/trace_processor/experimental/mappers/task_info_map_function.html
index 19dc86bde71677279ecbc2306936f21c8e5fd980..1be9bf8ad2a33f8ed4c81bab1894ec3465f133b5 100644
--- a/trace_processor/experimental/mappers/task_info_map_function.html
+++ b/trace_processor/experimental/mappers/task_info_map_function.html
@@ -16,9 +16,8 @@ found in the LICENSE file.
'use strict';
tr.exportTo('pi.m', function() {
- var DURATION_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
- tr.v.Unit.byName.timeDurationInMs,
- tr.b.Range.fromExplicitRange(0, 250), 50);
+ var DURATION_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(
+ 0, 250, 50);
function taskInfoMapFunction(result, model) {
var canonicalUrl = model.canonicalUrl;
@@ -98,7 +97,8 @@ tr.exportTo('pi.m', function() {
function addToHistogram(dict, processName, threadName, value, url) {
dict[processName] = dict[processName] || {};
dict[processName][threadName] = dict[processName][threadName] ||
- DURATION_NUMERIC_BUILDER.build();
+ new tr.v.Histogram(tr.v.Unit.byName.timeDurationInMs,
+ DURATION_BOUNDARIES);
dict[processName][threadName].add(value, url);
}
« no previous file with comments | « no previous file | trace_processor/experimental/mappers/trace_stats.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698