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/histogram_grouping.html"> | 8 <link rel="import" href="/tracing/value/histogram_grouping.html"> |
9 <link rel="import" href="/tracing/value/histogram_set.html"> | 9 <link rel="import" href="/tracing/value/histogram_set.html"> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 this.groupings_.push(grouping); | 34 this.groupings_.push(grouping); |
35 } | 35 } |
36 this.groupings_.sort((a, b) => a.key.localeCompare(b.key)); | 36 this.groupings_.sort((a, b) => a.key.localeCompare(b.key)); |
37 | 37 |
38 for (const hist of this.histograms_) { | 38 for (const hist of this.histograms_) { |
39 for (const name of hist.statisticsNames) { | 39 for (const name of hist.statisticsNames) { |
40 this.statisticsNames_.add(name); | 40 this.statisticsNames_.add(name); |
41 } | 41 } |
42 } | 42 } |
43 this.statisticsNames_ = Array.from(this.statisticsNames_); | 43 this.statisticsNames_ = Array.from(this.statisticsNames_); |
| 44 this.statisticsNames_.sort(); |
44 } | 45 } |
45 | 46 |
46 buildHeader_() { | 47 buildHeader_() { |
47 const header = ['name', 'unit']; | 48 const header = ['name', 'unit']; |
48 for (const name of this.statisticsNames_) { | 49 for (const name of this.statisticsNames_) { |
49 header.push(name); | 50 header.push(name); |
50 } | 51 } |
51 for (const grouping of this.groupings_) { | 52 for (const grouping of this.groupings_) { |
52 header.push(grouping.key); | 53 header.push(grouping.key); |
53 } | 54 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 89 } |
89 return str; | 90 return str; |
90 } | 91 } |
91 } | 92 } |
92 | 93 |
93 return { | 94 return { |
94 CSVBuilder, | 95 CSVBuilder, |
95 }; | 96 }; |
96 }); | 97 }); |
97 </script> | 98 </script> |
OLD | NEW |