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

Unified Diff: tracing/tracing/metrics/blink/gc_metric.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: tracing/tracing/metrics/blink/gc_metric.html
diff --git a/tracing/tracing/metrics/blink/gc_metric.html b/tracing/tracing/metrics/blink/gc_metric.html
index 4d933e755e45f83d1bcc09730af0bc3396db106e..b8091ac8055b742a7083d160d0b28326fb1caee4 100644
--- a/tracing/tracing/metrics/blink/gc_metric.html
+++ b/tracing/tracing/metrics/blink/gc_metric.html
@@ -44,15 +44,14 @@ tr.exportTo('tr.metrics.blink', function() {
var percentage_biggerIsBetter =
tr.v.Unit.byName.normalizedPercentage_biggerIsBetter;
- var numericBuilder = new tr.v.NumericBuilder(
- timeDurationInMs_smallerIsBetter, 0);
// 0.1 steps from 0 to 20 since it is the most common range.
- numericBuilder.addLinearBins(20, 200);
// Exponentially increasing steps from 20 to 200.
- numericBuilder.addExponentialBins(200, 100);
+ var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 20, 200)
+ .addExponentialBins(200, 100);
function createNumericForTopEventTime() {
- var n = numericBuilder.build();
+ var n = new tr.v.Histogram(
+ timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
n.customizeSummaryOptions({
avg: true,
count: true,
@@ -65,7 +64,8 @@ tr.exportTo('tr.metrics.blink', function() {
}
function createNumericForIdleTime() {
- var n = numericBuilder.build();
+ var n = new tr.v.Histogram(
+ timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
n.customizeSummaryOptions({
avg: true,
count: false,
@@ -78,12 +78,8 @@ tr.exportTo('tr.metrics.blink', function() {
return n;
}
- var PERCENTAGE_BUILDER = tr.v.NumericBuilder.createLinear(
- percentage_biggerIsBetter,
- tr.b.Range.fromExplicitRange(0, 1), 20);
-
function createPercentage(numerator, denominator) {
- var histogram = PERCENTAGE_BUILDER.build();
+ var histogram = new tr.v.Histogram(percentage_biggerIsBetter);
if (denominator === 0)
histogram.add(0);
else
« no previous file with comments | « trace_processor/experimental/mappers/trace_stats.html ('k') | tracing/tracing/metrics/cpu_process_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698