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

Side by Side Diff: tracing/tracing/metrics/system_health/webview_startup_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
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/metrics/metric_registry.html"> 8 <link rel="import" href="/tracing/metrics/metric_registry.html">
9 <link rel="import" href="/tracing/metrics/system_health/utils.html"> 9 <link rel="import" href="/tracing/metrics/system_health/utils.html">
10 <link rel="import" href="/tracing/value/histogram.html"> 10 <link rel="import" href="/tracing/value/histogram.html">
(...skipping 16 matching lines...) Expand all
27 // TODO(alexandermont): Only iterate over the processes and threads that 27 // TODO(alexandermont): Only iterate over the processes and threads that
28 // could contain these events. 28 // could contain these events.
29 for (var slice of model.getDescendantEvents()) { 29 for (var slice of model.getDescendantEvents()) {
30 if (!(slice instanceof tr.model.ThreadSlice)) 30 if (!(slice instanceof tr.model.ThreadSlice))
31 continue; 31 continue;
32 32
33 // WebViewStartupInterval is the title of the section of code that is 33 // WebViewStartupInterval is the title of the section of code that is
34 // entered (via android.os.Trace.beginSection) when WebView is started 34 // entered (via android.os.Trace.beginSection) when WebView is started
35 // up. This value is defined in TelemetryActivity.java. 35 // up. This value is defined in TelemetryActivity.java.
36 if (slice.title === 'WebViewStartupInterval') { 36 if (slice.title === 'WebViewStartupInterval') {
37 startupWallHist.add(slice.duration); 37 startupWallHist.addSample(slice.duration);
38 startupCPUHist.add(slice.cpuDuration); 38 startupCPUHist.addSample(slice.cpuDuration);
39 } 39 }
40 40
41 // WebViewBlankUrlLoadInterval is the title of the section of code 41 // WebViewBlankUrlLoadInterval is the title of the section of code
42 // that is entered (via android.os.Trace.beginSection) when WebView 42 // that is entered (via android.os.Trace.beginSection) when WebView
43 // is started up. This value is defined in TelemetryActivity.java. 43 // is started up. This value is defined in TelemetryActivity.java.
44 if (slice.title === 'WebViewBlankUrlLoadInterval') { 44 if (slice.title === 'WebViewBlankUrlLoadInterval') {
45 loadWallHist.add(slice.duration); 45 loadWallHist.addSample(slice.duration);
46 loadCPUHist.add(slice.cpuDuration); 46 loadCPUHist.addSample(slice.cpuDuration);
47 } 47 }
48 } 48 }
49 49
50 values.addValue(new tr.v.NumericValue('webview_startup_wall_time', 50 values.addValue(new tr.v.NumericValue('webview_startup_wall_time',
51 startupWallHist, {description: 'WebView startup wall time'})); 51 startupWallHist, {description: 'WebView startup wall time'}));
52 values.addValue(new tr.v.NumericValue('webview_startup_cpu_time', 52 values.addValue(new tr.v.NumericValue('webview_startup_cpu_time',
53 startupCPUHist, {description: 'WebView startup CPU time'})); 53 startupCPUHist, {description: 'WebView startup CPU time'}));
54 values.addValue(new tr.v.NumericValue('webview_url_load_wall_time', 54 values.addValue(new tr.v.NumericValue('webview_url_load_wall_time',
55 loadWallHist, {description: 'WebView blank URL load wall time'})); 55 loadWallHist, {description: 'WebView blank URL load wall time'}));
56 values.addValue(new tr.v.NumericValue('webview_url_load_cpu_time', 56 values.addValue(new tr.v.NumericValue('webview_url_load_cpu_time',
57 loadCPUHist, {description: 'WebView blank URL load CPU time'})); 57 loadCPUHist, {description: 'WebView blank URL load CPU time'}));
58 }; 58 };
59 59
60 tr.metrics.MetricRegistry.register(webviewStartupMetric); 60 tr.metrics.MetricRegistry.register(webviewStartupMetric);
61 61
62 return { 62 return {
63 webviewStartupMetric: webviewStartupMetric 63 webviewStartupMetric: webviewStartupMetric
64 }; 64 };
65 }); 65 });
66 </script> 66 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/responsiveness_metric.html ('k') | tracing/tracing/metrics/tracing_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698