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

Unified Diff: trace_processor/experimental/mappers/trace_stats.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
Index: trace_processor/experimental/mappers/trace_stats.html
diff --git a/trace_processor/experimental/mappers/trace_stats.html b/trace_processor/experimental/mappers/trace_stats.html
index 2af90f8cc43a38d80b817a84b995e272d62199d1..5133dc3321529117517b25b3d6298f07b94ef4f5 100644
--- a/trace_processor/experimental/mappers/trace_stats.html
+++ b/trace_processor/experimental/mappers/trace_stats.html
@@ -14,9 +14,7 @@ found in the LICENSE file.
'use strict';
tr.exportTo('pi.m', function() {
- var COUNT_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
- tr.v.Unit.byName.unitlessNumber, tr.b.Range.fromExplicitRange(0, 50000),
- 20);
+ var COUNT_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 5e4, 20);
function traceStatsFunction(result, model) {
var canonicalUrl = model.canonicalUrl;
@@ -47,7 +45,8 @@ tr.exportTo('pi.m', function() {
seconds_counts[second]++;
}
- var histogram = COUNT_NUMERIC_BUILDER.build();
+ var histogram = new tr.v.Histogram(
+ tr.v.Unit.byName.count, COUNT_BOUNDARIES);
for (var second in seconds_counts)
histogram.add(seconds_counts[second]);
« no previous file with comments | « trace_processor/experimental/mappers/task_info_map_function.html ('k') | tracing/tracing/metrics/blink/gc_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698