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

Unified Diff: tracing/tracing/metrics/cpu_process_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
« no previous file with comments | « tracing/tracing/metrics/blink/gc_metric.html ('k') | tracing/tracing/metrics/cpu_process_metric_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/cpu_process_metric.html
diff --git a/tracing/tracing/metrics/cpu_process_metric.html b/tracing/tracing/metrics/cpu_process_metric.html
index 8adbdc96f211daa91aba9a0ec85c936abe4038c2..8f0420117a4c92a8cdd92737b9ceefec2c966780 100644
--- a/tracing/tracing/metrics/cpu_process_metric.html
+++ b/tracing/tracing/metrics/cpu_process_metric.html
@@ -13,11 +13,6 @@ found in the LICENSE file.
'use strict';
tr.exportTo('tr.metrics.sh', function() {
-
- var CPU_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
- tr.v.Unit.byName.normalizedPercentage_smallerIsBetter,
- tr.b.Range.fromExplicitRange(0, 100), 20);
-
function getCpuSnapshotsFromModel(model) {
var snapshots = [];
for (var pid in model.processes) {
@@ -53,12 +48,13 @@ tr.exportTo('tr.metrics.sh', function() {
for (var [processName, processData] of processSums.entries()) {
if (!(processNumerics.has(processName))) {
processNumerics.set(processName, {
- numeric: CPU_NUMERIC_BUILDER.build(),
+ numeric: new tr.v.Histogram(
+ tr.v.Unit.byName.normalizedPercentage_smallerIsBetter),
paths: new Set()
});
}
processNumerics.get(processName).numeric.add(
- processData.sum);
+ processData.sum / 100.0);
for (var path of processData.paths)
processNumerics.get(processName).paths.add(path);
}
« no previous file with comments | « tracing/tracing/metrics/blink/gc_metric.html ('k') | tracing/tracing/metrics/cpu_process_metric_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698