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

Side by Side Diff: tracing/tracing/metrics/v8/execution_metric.html

Issue 2283213002: Rename Histogram.add() to addSample(). (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « tracing/tracing/metrics/tracing_metric.html ('k') | tracing/tracing/metrics/v8/gc_metric.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/range.html"> 8 <link rel="import" href="/tracing/base/range.html">
9 <link rel="import" href="/tracing/metrics/metric_registry.html"> 9 <link rel="import" href="/tracing/metrics/metric_registry.html">
10 <link rel="import" href="/tracing/value/histogram.html"> 10 <link rel="import" href="/tracing/value/histogram.html">
(...skipping 10 matching lines...) Expand all
21 var cpuTotalExecution = new tr.v.Histogram( 21 var cpuTotalExecution = new tr.v.Histogram(
22 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 22 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
23 var wallTotalExecution = new tr.v.Histogram( 23 var wallTotalExecution = new tr.v.Histogram(
24 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 24 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
25 var cpuSelfExecution = new tr.v.Histogram( 25 var cpuSelfExecution = new tr.v.Histogram(
26 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 26 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
27 var wallSelfExecution = new tr.v.Histogram( 27 var wallSelfExecution = new tr.v.Histogram(
28 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 28 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
29 29
30 for (var e of model.findTopmostSlicesNamed('V8.Execute')) { 30 for (var e of model.findTopmostSlicesNamed('V8.Execute')) {
31 cpuTotalExecution.add(e.cpuDuration); 31 cpuTotalExecution.addSample(e.cpuDuration);
32 wallTotalExecution.add(e.duration); 32 wallTotalExecution.addSample(e.duration);
33 cpuSelfExecution.add(e.cpuSelfTime); 33 cpuSelfExecution.addSample(e.cpuSelfTime);
34 wallSelfExecution.add(e.selfTime); 34 wallSelfExecution.addSample(e.selfTime);
35 } 35 }
36 36
37 values.addValue(new tr.v.NumericValue( 37 values.addValue(new tr.v.NumericValue(
38 'v8_execution_cpu_total', cpuTotalExecution, 38 'v8_execution_cpu_total', cpuTotalExecution,
39 { description: 'cpu total time spent in script execution' })); 39 { description: 'cpu total time spent in script execution' }));
40 values.addValue(new tr.v.NumericValue( 40 values.addValue(new tr.v.NumericValue(
41 'v8_execution_wall_total', wallTotalExecution, 41 'v8_execution_wall_total', wallTotalExecution,
42 { description: 'wall total time spent in script execution' })); 42 { description: 'wall total time spent in script execution' }));
43 values.addValue(new tr.v.NumericValue( 43 values.addValue(new tr.v.NumericValue(
44 'v8_execution_cpu_self', cpuSelfExecution, 44 'v8_execution_cpu_self', cpuSelfExecution,
45 { description: 'cpu self time spent in script execution' })); 45 { description: 'cpu self time spent in script execution' }));
46 values.addValue(new tr.v.NumericValue( 46 values.addValue(new tr.v.NumericValue(
47 'v8_execution_wall_self', wallSelfExecution, 47 'v8_execution_wall_self', wallSelfExecution,
48 { description: 'wall self time spent in script execution' })); 48 { description: 'wall self time spent in script execution' }));
49 } 49 }
50 50
51 function computeParseLazyMetrics(values, model) { 51 function computeParseLazyMetrics(values, model) {
52 var cpuSelfParseLazy = new tr.v.Histogram( 52 var cpuSelfParseLazy = new tr.v.Histogram(
53 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 53 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
54 var wallSelfParseLazy = new tr.v.Histogram( 54 var wallSelfParseLazy = new tr.v.Histogram(
55 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 55 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
56 56
57 for (var e of model.findTopmostSlicesNamed('V8.ParseLazyMicroSeconds')) { 57 for (var e of model.findTopmostSlicesNamed('V8.ParseLazyMicroSeconds')) {
58 cpuSelfParseLazy.add(e.cpuSelfTime); 58 cpuSelfParseLazy.addSample(e.cpuSelfTime);
59 wallSelfParseLazy.add(e.selfTime); 59 wallSelfParseLazy.addSample(e.selfTime);
60 } 60 }
61 for (var e of model.findTopmostSlicesNamed('V8.ParseLazy')) { 61 for (var e of model.findTopmostSlicesNamed('V8.ParseLazy')) {
62 cpuSelfParseLazy.add(e.cpuSelfTime); 62 cpuSelfParseLazy.addSample(e.cpuSelfTime);
63 wallSelfParseLazy.add(e.selfTime); 63 wallSelfParseLazy.addSample(e.selfTime);
64 } 64 }
65 65
66 values.addValue(new tr.v.NumericValue( 66 values.addValue(new tr.v.NumericValue(
67 'v8_parse_lazy_cpu_self', cpuSelfParseLazy, 67 'v8_parse_lazy_cpu_self', cpuSelfParseLazy,
68 { description: 'cpu self time spent performing lazy parsing' })); 68 { description: 'cpu self time spent performing lazy parsing' }));
69 values.addValue(new tr.v.NumericValue( 69 values.addValue(new tr.v.NumericValue(
70 'v8_parse_lazy_wall_self', wallSelfParseLazy, 70 'v8_parse_lazy_wall_self', wallSelfParseLazy,
71 { description: 'wall self time spent performing lazy parsing' })); 71 { description: 'wall self time spent performing lazy parsing' }));
72 } 72 }
73 73
74 function computeCompileFullCodeMetrics(values, model) { 74 function computeCompileFullCodeMetrics(values, model) {
75 var cpuSelfCompileFullCode = new tr.v.Histogram( 75 var cpuSelfCompileFullCode = new tr.v.Histogram(
76 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 76 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
77 var wallSelfCompileFullCode = new tr.v.Histogram( 77 var wallSelfCompileFullCode = new tr.v.Histogram(
78 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 78 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
79 79
80 for (var e of model.findTopmostSlicesNamed('V8.CompileFullCode')) { 80 for (var e of model.findTopmostSlicesNamed('V8.CompileFullCode')) {
81 cpuSelfCompileFullCode.add(e.cpuSelfTime); 81 cpuSelfCompileFullCode.addSample(e.cpuSelfTime);
82 wallSelfCompileFullCode.add(e.selfTime); 82 wallSelfCompileFullCode.addSample(e.selfTime);
83 } 83 }
84 84
85 values.addValue(new tr.v.NumericValue( 85 values.addValue(new tr.v.NumericValue(
86 'v8_compile_full_code_cpu_self', 86 'v8_compile_full_code_cpu_self',
87 cpuSelfCompileFullCode, 87 cpuSelfCompileFullCode,
88 { description: 'cpu self time spent performing compiling full code' })); 88 { description: 'cpu self time spent performing compiling full code' }));
89 values.addValue(new tr.v.NumericValue( 89 values.addValue(new tr.v.NumericValue(
90 'v8_compile_full_code_wall_self', 90 'v8_compile_full_code_wall_self',
91 wallSelfCompileFullCode, { 91 wallSelfCompileFullCode, {
92 description: 'wall self time spent performing compiling full code' 92 description: 'wall self time spent performing compiling full code'
93 })); 93 }));
94 } 94 }
95 95
96 function computeCompileIgnitionMetrics(values, model) { 96 function computeCompileIgnitionMetrics(values, model) {
97 var cpuSelfCompileIgnition = new tr.v.Histogram( 97 var cpuSelfCompileIgnition = new tr.v.Histogram(
98 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 98 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
99 var wallSelfCompileIgnition = new tr.v.Histogram( 99 var wallSelfCompileIgnition = new tr.v.Histogram(
100 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 100 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
101 101
102 for (var e of model.findTopmostSlicesNamed('V8.CompileIgnition')) { 102 for (var e of model.findTopmostSlicesNamed('V8.CompileIgnition')) {
103 cpuSelfCompileIgnition.add(e.cpuSelfTime); 103 cpuSelfCompileIgnition.addSample(e.cpuSelfTime);
104 wallSelfCompileIgnition.add(e.selfTime); 104 wallSelfCompileIgnition.addSample(e.selfTime);
105 } 105 }
106 106
107 values.addValue(new tr.v.NumericValue( 107 values.addValue(new tr.v.NumericValue(
108 'v8_compile_ignition_cpu_self', 108 'v8_compile_ignition_cpu_self',
109 cpuSelfCompileIgnition, 109 cpuSelfCompileIgnition,
110 { description: 'cpu self time spent in compile ignition' })); 110 { description: 'cpu self time spent in compile ignition' }));
111 values.addValue(new tr.v.NumericValue( 111 values.addValue(new tr.v.NumericValue(
112 'v8_compile_ignition_wall_self', 112 'v8_compile_ignition_wall_self',
113 wallSelfCompileIgnition, { 113 wallSelfCompileIgnition, {
114 description: 'wall self time spent in compile ignition' 114 description: 'wall self time spent in compile ignition'
(...skipping 10 matching lines...) Expand all
125 var wallTotalRecompileConcurrent = new tr.v.Histogram( 125 var wallTotalRecompileConcurrent = new tr.v.Histogram(
126 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 126 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
127 // TODO(eakuefner): Stop computing overall values once dash v2 is ready. 127 // TODO(eakuefner): Stop computing overall values once dash v2 is ready.
128 // https://github.com/catapult-project/catapult/issues/2180 128 // https://github.com/catapult-project/catapult/issues/2180
129 var cpuTotalRecompileOverall = new tr.v.Histogram( 129 var cpuTotalRecompileOverall = new tr.v.Histogram(
130 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 130 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
131 var wallTotalRecompileOverall = new tr.v.Histogram( 131 var wallTotalRecompileOverall = new tr.v.Histogram(
132 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 132 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
133 133
134 for (var e of model.findTopmostSlicesNamed('V8.RecompileSynchronous')) { 134 for (var e of model.findTopmostSlicesNamed('V8.RecompileSynchronous')) {
135 cpuTotalRecompileSynchronous.add(e.cpuDuration); 135 cpuTotalRecompileSynchronous.addSample(e.cpuDuration);
136 wallTotalRecompileSynchronous.add(e.duration); 136 wallTotalRecompileSynchronous.addSample(e.duration);
137 cpuTotalRecompileOverall.add(e.cpuDuration); 137 cpuTotalRecompileOverall.addSample(e.cpuDuration);
138 wallTotalRecompileOverall.add(e.duration); 138 wallTotalRecompileOverall.addSample(e.duration);
139 } 139 }
140 140
141 values.addValue(new tr.v.NumericValue( 141 values.addValue(new tr.v.NumericValue(
142 'v8_recompile_synchronous_cpu_total', 142 'v8_recompile_synchronous_cpu_total',
143 cpuTotalRecompileSynchronous, 143 cpuTotalRecompileSynchronous,
144 { description: 'cpu total time spent in synchronous recompilation' })); 144 { description: 'cpu total time spent in synchronous recompilation' }));
145 values.addValue(new tr.v.NumericValue( 145 values.addValue(new tr.v.NumericValue(
146 'v8_recompile_synchronous_wall_total', 146 'v8_recompile_synchronous_wall_total',
147 wallTotalRecompileSynchronous, 147 wallTotalRecompileSynchronous,
148 { description: 'wall total time spent in synchronous recompilation' })); 148 { description: 'wall total time spent in synchronous recompilation' }));
149 149
150 150
151 for (var e of model.findTopmostSlicesNamed('V8.RecompileConcurrent')) { 151 for (var e of model.findTopmostSlicesNamed('V8.RecompileConcurrent')) {
152 cpuTotalRecompileConcurrent.add(e.cpuDuration); 152 cpuTotalRecompileConcurrent.addSample(e.cpuDuration);
153 wallTotalRecompileConcurrent.add(e.duration); 153 wallTotalRecompileConcurrent.addSample(e.duration);
154 cpuTotalRecompileOverall.add(e.cpuDuration); 154 cpuTotalRecompileOverall.addSample(e.cpuDuration);
155 wallTotalRecompileOverall.add(e.duration); 155 wallTotalRecompileOverall.addSample(e.duration);
156 } 156 }
157 157
158 values.addValue(new tr.v.NumericValue( 158 values.addValue(new tr.v.NumericValue(
159 'v8_recompile_concurrent_cpu_total', 159 'v8_recompile_concurrent_cpu_total',
160 cpuTotalRecompileConcurrent, 160 cpuTotalRecompileConcurrent,
161 { description: 'cpu total time spent in concurrent recompilation' })); 161 { description: 'cpu total time spent in concurrent recompilation' }));
162 values.addValue(new tr.v.NumericValue( 162 values.addValue(new tr.v.NumericValue(
163 'v8_recompile_concurrent_wall_total', 163 'v8_recompile_concurrent_wall_total',
164 wallTotalRecompileConcurrent, 164 wallTotalRecompileConcurrent,
165 { description: 'wall total time spent in concurrent recompilation' })); 165 { description: 'wall total time spent in concurrent recompilation' }));
(...skipping 11 matching lines...) Expand all
177 })); 177 }));
178 } 178 }
179 179
180 function computeOptimizeCodeMetrics(values, model) { 180 function computeOptimizeCodeMetrics(values, model) {
181 var cpuTotalOptimizeCode = new tr.v.Histogram( 181 var cpuTotalOptimizeCode = new tr.v.Histogram(
182 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 182 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
183 var wallTotalOptimizeCode = new tr.v.Histogram( 183 var wallTotalOptimizeCode = new tr.v.Histogram(
184 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 184 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
185 185
186 for (var e of model.findTopmostSlicesNamed('V8.OptimizeCode')) { 186 for (var e of model.findTopmostSlicesNamed('V8.OptimizeCode')) {
187 cpuTotalOptimizeCode.add(e.cpuDuration); 187 cpuTotalOptimizeCode.addSample(e.cpuDuration);
188 wallTotalOptimizeCode.add(e.duration); 188 wallTotalOptimizeCode.addSample(e.duration);
189 } 189 }
190 190
191 values.addValue(new tr.v.NumericValue( 191 values.addValue(new tr.v.NumericValue(
192 'v8_optimize_code_cpu_total', 192 'v8_optimize_code_cpu_total',
193 cpuTotalOptimizeCode, 193 cpuTotalOptimizeCode,
194 { description: 'cpu total time spent in code optimization' })); 194 { description: 'cpu total time spent in code optimization' }));
195 values.addValue(new tr.v.NumericValue( 195 values.addValue(new tr.v.NumericValue(
196 'v8_optimize_code_wall_total', 196 'v8_optimize_code_wall_total',
197 wallTotalOptimizeCode, 197 wallTotalOptimizeCode,
198 { description: 'wall total time spent in code optimization' })); 198 { description: 'wall total time spent in code optimization' }));
199 } 199 }
200 200
201 function computeDeoptimizeCodeMetrics(values, model) { 201 function computeDeoptimizeCodeMetrics(values, model) {
202 var cpuTotalDeoptimizeCode = new tr.v.Histogram( 202 var cpuTotalDeoptimizeCode = new tr.v.Histogram(
203 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 203 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
204 var wallTotalDeoptimizeCode = new tr.v.Histogram( 204 var wallTotalDeoptimizeCode = new tr.v.Histogram(
205 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES); 205 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
206 206
207 for (var e of model.findTopmostSlicesNamed('V8.DeoptimizeCode')) { 207 for (var e of model.findTopmostSlicesNamed('V8.DeoptimizeCode')) {
208 cpuTotalDeoptimizeCode.add(e.cpuDuration); 208 cpuTotalDeoptimizeCode.addSample(e.cpuDuration);
209 wallTotalDeoptimizeCode.add(e.duration); 209 wallTotalDeoptimizeCode.addSample(e.duration);
210 } 210 }
211 211
212 values.addValue(new tr.v.NumericValue( 212 values.addValue(new tr.v.NumericValue(
213 'v8_deoptimize_code_cpu_total', 213 'v8_deoptimize_code_cpu_total',
214 cpuTotalDeoptimizeCode, 214 cpuTotalDeoptimizeCode,
215 { description: 'cpu total time spent in code deoptimization' })); 215 { description: 'cpu total time spent in code deoptimization' }));
216 values.addValue(new tr.v.NumericValue( 216 values.addValue(new tr.v.NumericValue(
217 'v8_deoptimize_code_wall_total', 217 'v8_deoptimize_code_wall_total',
218 wallTotalDeoptimizeCode, 218 wallTotalDeoptimizeCode,
219 { description: 'wall total time spent in code deoptimization' })); 219 { description: 'wall total time spent in code deoptimization' }));
220 } 220 }
221 221
222 function executionMetric(values, model) { 222 function executionMetric(values, model) {
223 computeExecuteMetrics(values, model); 223 computeExecuteMetrics(values, model);
224 computeParseLazyMetrics(values, model); 224 computeParseLazyMetrics(values, model);
225 computeCompileIgnitionMetrics(values, model); 225 computeCompileIgnitionMetrics(values, model);
226 computeCompileFullCodeMetrics(values, model); 226 computeCompileFullCodeMetrics(values, model);
227 computeRecompileMetrics(values, model); 227 computeRecompileMetrics(values, model);
228 computeOptimizeCodeMetrics(values, model); 228 computeOptimizeCodeMetrics(values, model);
229 computeDeoptimizeCodeMetrics(values, model); 229 computeDeoptimizeCodeMetrics(values, model);
230 } 230 }
231 231
232 tr.metrics.MetricRegistry.register(executionMetric); 232 tr.metrics.MetricRegistry.register(executionMetric);
233 233
234 return { 234 return {
235 executionMetric: executionMetric 235 executionMetric: executionMetric
236 }; 236 };
237 }); 237 });
238 </script> 238 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/tracing_metric.html ('k') | tracing/tracing/metrics/v8/gc_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698