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

Side by Side Diff: tracing/tracing/value/diagnostics/composition.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/v8/gc_metric.html ('k') | tracing/tracing/value/histogram.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/value/diagnostics/related_value_map.html"> 8 <link rel="import" href="/tracing/value/diagnostics/related_value_map.html">
9 9
10 <script> 10 <script>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 var eventCategory = categoryForEvent.call(opt_this, event); 103 var eventCategory = categoryForEvent.call(opt_this, event);
104 var value = composition.get(eventCategory); 104 var value = composition.get(eventCategory);
105 if (value === undefined) { 105 if (value === undefined) {
106 value = new tr.v.NumericValue(namePrefix + eventCategory, 106 value = new tr.v.NumericValue(namePrefix + eventCategory,
107 new tr.v.Histogram(unit, opt_binBoundaries)); 107 new tr.v.Histogram(unit, opt_binBoundaries));
108 values.addValue(value); 108 values.addValue(value);
109 composition.set(eventCategory, value); 109 composition.set(eventCategory, value);
110 } 110 }
111 111
112 value.numeric.add(sample, tr.v.d.DiagnosticMap.fromObject( 112 value.numeric.addSample(sample,
113 {relatedEvents: new tr.v.d.RelatedEventSet([event])})); 113 {relatedEvents: new tr.v.d.RelatedEventSet([event])});
114 } 114 }
115 return composition; 115 return composition;
116 } 116 }
117 }; 117 };
118 118
119 tr.v.d.Diagnostic.register(Composition, { 119 tr.v.d.Diagnostic.register(Composition, {
120 elementName: 'tr-v-ui-composition-span' 120 elementName: 'tr-v-ui-composition-span'
121 }); 121 });
122 122
123 return { 123 return {
124 COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER: 124 COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER:
125 COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER, 125 COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER,
126 Composition: Composition 126 Composition: Composition
127 }; 127 };
128 }); 128 });
129 </script> 129 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/v8/gc_metric.html ('k') | tracing/tracing/value/histogram.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698