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

Unified Diff: tracing/tracing/metrics/v8/execution_metric.html

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric Created 4 years, 3 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/v8/execution_metric.html
diff --git a/tracing/tracing/metrics/v8/execution_metric.html b/tracing/tracing/metrics/v8/execution_metric.html
index a6e1bb15724c7f474d5c7ee09d11e527dd522de0..37a0f2f8f990e35ba38ed71f6e6c2080e97978da 100644
--- a/tracing/tracing/metrics/v8/execution_metric.html
+++ b/tracing/tracing/metrics/v8/execution_metric.html
@@ -9,7 +9,6 @@ found in the LICENSE file.
<link rel="import" href="/tracing/base/unit.html">
<link rel="import" href="/tracing/metrics/metric_registry.html">
<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value.html">
<script>
'use strict';
@@ -18,14 +17,19 @@ tr.exportTo('tr.metrics.v8', function() {
var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(4, 200, 100);
function computeExecuteMetrics(values, model) {
- var cpuTotalExecution = new tr.v.Histogram(
+ var cpuTotalExecution = new tr.v.Histogram('v8_execution_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- var wallTotalExecution = new tr.v.Histogram(
+ cpuTotalExecution.description = 'cpu total time spent in script execution';
+ var wallTotalExecution = new tr.v.Histogram('v8_execution_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- var cpuSelfExecution = new tr.v.Histogram(
+ wallTotalExecution.description =
+ 'wall total time spent in script execution';
+ var cpuSelfExecution = new tr.v.Histogram('v8_execution_cpu_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- var wallSelfExecution = new tr.v.Histogram(
+ cpuSelfExecution.description = 'cpu self time spent in script execution';
+ var wallSelfExecution = new tr.v.Histogram('v8_execution_wall_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallSelfExecution.description = 'wall self time spent in script execution';
for (var e of model.findTopmostSlicesNamed('V8.Execute')) {
cpuTotalExecution.addSample(e.cpuDuration);
@@ -34,25 +38,21 @@ tr.exportTo('tr.metrics.v8', function() {
wallSelfExecution.addSample(e.selfTime);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_execution_cpu_total', cpuTotalExecution,
- { description: 'cpu total time spent in script execution' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_execution_wall_total', wallTotalExecution,
- { description: 'wall total time spent in script execution' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_execution_cpu_self', cpuSelfExecution,
- { description: 'cpu self time spent in script execution' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_execution_wall_self', wallSelfExecution,
- { description: 'wall self time spent in script execution' }));
+ values.addHistogram(cpuTotalExecution);
+ values.addHistogram(wallTotalExecution);
+ values.addHistogram(cpuSelfExecution);
+ values.addHistogram(wallSelfExecution);
}
function computeParseLazyMetrics(values, model) {
- var cpuSelfParseLazy = new tr.v.Histogram(
+ var cpuSelfParseLazy = new tr.v.Histogram('v8_parse_lazy_cpu_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- var wallSelfParseLazy = new tr.v.Histogram(
+ cpuSelfParseLazy.description =
+ 'cpu self time spent performing lazy parsing';
+ var wallSelfParseLazy = new tr.v.Histogram('v8_parse_lazy_wall_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallSelfParseLazy.description =
+ 'wall self time spent performing lazy parsing';
for (var e of model.findTopmostSlicesNamed('V8.ParseLazyMicroSeconds')) {
cpuSelfParseLazy.addSample(e.cpuSelfTime);
@@ -63,73 +63,85 @@ tr.exportTo('tr.metrics.v8', function() {
wallSelfParseLazy.addSample(e.selfTime);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_parse_lazy_cpu_self', cpuSelfParseLazy,
- { description: 'cpu self time spent performing lazy parsing' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_parse_lazy_wall_self', wallSelfParseLazy,
- { description: 'wall self time spent performing lazy parsing' }));
+ values.addHistogram(cpuSelfParseLazy);
+ values.addHistogram(wallSelfParseLazy);
}
function computeCompileFullCodeMetrics(values, model) {
var cpuSelfCompileFullCode = new tr.v.Histogram(
+ 'v8_compile_full_code_cpu_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuSelfCompileFullCode.description =
+ 'cpu self time spent performing compiling full code';
var wallSelfCompileFullCode = new tr.v.Histogram(
+ 'v8_compile_full_code_wall_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallSelfCompileFullCode.description =
+ 'wall self time spent performing compiling full code';
for (var e of model.findTopmostSlicesNamed('V8.CompileFullCode')) {
cpuSelfCompileFullCode.addSample(e.cpuSelfTime);
wallSelfCompileFullCode.addSample(e.selfTime);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_compile_full_code_cpu_self',
- cpuSelfCompileFullCode,
- { description: 'cpu self time spent performing compiling full code' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_compile_full_code_wall_self',
- wallSelfCompileFullCode, {
- description: 'wall self time spent performing compiling full code'
- }));
+ values.addHistogram(cpuSelfCompileFullCode);
+ values.addHistogram(wallSelfCompileFullCode);
}
function computeCompileIgnitionMetrics(values, model) {
var cpuSelfCompileIgnition = new tr.v.Histogram(
+ 'v8_compile_ignition_cpu_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuSelfCompileIgnition.description =
+ 'cpu self time spent in compile ignition';
var wallSelfCompileIgnition = new tr.v.Histogram(
+ 'v8_compile_ignition_wall_self',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallSelfCompileIgnition.description =
+ 'wall self time spent in compile ignition';
for (var e of model.findTopmostSlicesNamed('V8.CompileIgnition')) {
cpuSelfCompileIgnition.addSample(e.cpuSelfTime);
wallSelfCompileIgnition.addSample(e.selfTime);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_compile_ignition_cpu_self',
- cpuSelfCompileIgnition,
- { description: 'cpu self time spent in compile ignition' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_compile_ignition_wall_self',
- wallSelfCompileIgnition, {
- description: 'wall self time spent in compile ignition'
- }));
+ values.addHistogram(cpuSelfCompileIgnition);
+ values.addHistogram(wallSelfCompileIgnition);
}
function computeRecompileMetrics(values, model) {
var cpuTotalRecompileSynchronous = new tr.v.Histogram(
+ 'v8_recompile_synchronous_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuTotalRecompileSynchronous.description =
+ 'cpu total time spent in synchronous recompilation';
var wallTotalRecompileSynchronous = new tr.v.Histogram(
+ 'v8_recompile_synchronous_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallTotalRecompileSynchronous.description =
+ 'wall total time spent in synchronous recompilation';
var cpuTotalRecompileConcurrent = new tr.v.Histogram(
+ 'v8_recompile_concurrent_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuTotalRecompileConcurrent.description =
+ 'cpu total time spent in concurrent recompilation';
var wallTotalRecompileConcurrent = new tr.v.Histogram(
+ 'v8_recompile_concurrent_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallTotalRecompileConcurrent.description =
+ 'wall total time spent in concurrent recompilation';
// TODO(eakuefner): Stop computing overall values once dash v2 is ready.
// https://github.com/catapult-project/catapult/issues/2180
var cpuTotalRecompileOverall = new tr.v.Histogram(
+ 'v8_recompile_overall_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuTotalRecompileOverall.description =
+ 'cpu total time spent in synchronous or concurrent recompilation';
var wallTotalRecompileOverall = new tr.v.Histogram(
+ 'v8_recompile_overall_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallTotalRecompileOverall.description =
+ 'wall total time spent in synchronous or concurrent recompilation';
for (var e of model.findTopmostSlicesNamed('V8.RecompileSynchronous')) {
cpuTotalRecompileSynchronous.addSample(e.cpuDuration);
@@ -138,15 +150,8 @@ tr.exportTo('tr.metrics.v8', function() {
wallTotalRecompileOverall.addSample(e.duration);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_synchronous_cpu_total',
- cpuTotalRecompileSynchronous,
- { description: 'cpu total time spent in synchronous recompilation' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_synchronous_wall_total',
- wallTotalRecompileSynchronous,
- { description: 'wall total time spent in synchronous recompilation' }));
-
+ values.addHistogram(cpuTotalRecompileSynchronous);
+ values.addHistogram(wallTotalRecompileSynchronous);
for (var e of model.findTopmostSlicesNamed('V8.RecompileConcurrent')) {
cpuTotalRecompileConcurrent.addSample(e.cpuDuration);
@@ -155,68 +160,51 @@ tr.exportTo('tr.metrics.v8', function() {
wallTotalRecompileOverall.addSample(e.duration);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_concurrent_cpu_total',
- cpuTotalRecompileConcurrent,
- { description: 'cpu total time spent in concurrent recompilation' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_concurrent_wall_total',
- wallTotalRecompileConcurrent,
- { description: 'wall total time spent in concurrent recompilation' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_overall_cpu_total',
- cpuTotalRecompileOverall, {
- description:
- 'cpu total time spent in synchronous or concurrent recompilation'
- }));
- values.addValue(new tr.v.NumericValue(
- 'v8_recompile_overall_wall_total',
- wallTotalRecompileOverall, {
- description:
- 'wall total time spent in synchronous or concurrent recompilation'
- }));
+ values.addHistogram(cpuTotalRecompileConcurrent);
+ values.addHistogram(wallTotalRecompileConcurrent);
+ values.addHistogram(cpuTotalRecompileOverall);
+ values.addHistogram(wallTotalRecompileOverall);
}
function computeOptimizeCodeMetrics(values, model) {
- var cpuTotalOptimizeCode = new tr.v.Histogram(
+ var cpuTotalOptimizeCode = new tr.v.Histogram('v8_optimize_code_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuTotalOptimizeCode.description =
+ 'cpu total time spent in code optimization';
var wallTotalOptimizeCode = new tr.v.Histogram(
+ 'v8_optimize_code_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallTotalOptimizeCode.description =
+ 'wall total time spent in code optimization';
for (var e of model.findTopmostSlicesNamed('V8.OptimizeCode')) {
cpuTotalOptimizeCode.addSample(e.cpuDuration);
wallTotalOptimizeCode.addSample(e.duration);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_optimize_code_cpu_total',
- cpuTotalOptimizeCode,
- { description: 'cpu total time spent in code optimization' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_optimize_code_wall_total',
- wallTotalOptimizeCode,
- { description: 'wall total time spent in code optimization' }));
+ values.addHistogram(cpuTotalOptimizeCode);
+ values.addHistogram(wallTotalOptimizeCode);
}
function computeDeoptimizeCodeMetrics(values, model) {
var cpuTotalDeoptimizeCode = new tr.v.Histogram(
+ 'v8_deoptimize_code_cpu_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ cpuTotalDeoptimizeCode.description =
+ 'cpu total time spent in code deoptimization';
var wallTotalDeoptimizeCode = new tr.v.Histogram(
+ 'v8_deoptimize_code_wall_total',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
+ wallTotalDeoptimizeCode.description =
+ 'wall total time spent in code deoptimization';
for (var e of model.findTopmostSlicesNamed('V8.DeoptimizeCode')) {
cpuTotalDeoptimizeCode.addSample(e.cpuDuration);
wallTotalDeoptimizeCode.addSample(e.duration);
}
- values.addValue(new tr.v.NumericValue(
- 'v8_deoptimize_code_cpu_total',
- cpuTotalDeoptimizeCode,
- { description: 'cpu total time spent in code deoptimization' }));
- values.addValue(new tr.v.NumericValue(
- 'v8_deoptimize_code_wall_total',
- wallTotalDeoptimizeCode,
- { description: 'wall total time spent in code deoptimization' }));
+ values.addHistogram(cpuTotalDeoptimizeCode);
+ values.addHistogram(wallTotalDeoptimizeCode);
}
function executionMetric(values, model) {
« no previous file with comments | « tracing/tracing/metrics/tracing_metric_test.html ('k') | tracing/tracing/metrics/v8/execution_metric_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698