| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |