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/csv_builder.html"> | 8 <link rel="import" href="/tracing/value/csv_builder.html"> |
9 | 9 |
10 <script> | 10 <script> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 new tr.v.d.GenericSet(['benchmark A'])); | 47 new tr.v.d.GenericSet(['benchmark A'])); |
48 hist0.diagnostics.set(tr.v.d.RESERVED_NAMES.BENCHMARK_START, | 48 hist0.diagnostics.set(tr.v.d.RESERVED_NAMES.BENCHMARK_START, |
49 new tr.v.d.DateRange(1499726648646)); | 49 new tr.v.d.DateRange(1499726648646)); |
50 | 50 |
51 const histograms = new tr.v.HistogramSet([hist0, hist1, hist2]); | 51 const histograms = new tr.v.HistogramSet([hist0, hist1, hist2]); |
52 let csv = new tr.v.CSVBuilder(histograms); | 52 let csv = new tr.v.CSVBuilder(histograms); |
53 csv.build(); | 53 csv.build(); |
54 csv = csv.toString().split('\n'); | 54 csv = csv.toString().split('\n'); |
55 assert.lengthOf(csv, histograms.length + 2); | 55 assert.lengthOf(csv, histograms.length + 2); |
56 assert.strictEqual(csv[0], | 56 assert.strictEqual(csv[0], |
57 'name,unit,avg,nans,pct_010,pct_090,count,max,min,std,sum,' + | 57 'name,unit,avg,count,max,min,nans,pct_010,pct_090,std,sum,' + |
58 'architectures,benchmarks,benchmarkStart,bots,builds,displayLabel,' + | 58 'architectures,benchmarks,benchmarkStart,bots,builds,displayLabel,' + |
59 'masters,memoryAmounts,osNames,osVersions,productVersions,stories,' + | 59 'masters,memoryAmounts,osNames,osVersions,productVersions,stories,' + |
60 'storysetRepeats,traceStart'); | 60 'storysetRepeats,traceStart'); |
61 assert.strictEqual(csv[1], | 61 assert.strictEqual(csv[1], |
62 'hist0,B,500,1,150,950,,,,,,,benchmark A,2017-07-10 22:44:08,,,' + | 62 'hist0,B,500,,,,1,150,950,,,,benchmark A,2017-07-10 22:44:08,,,' + |
63 'label A,,,,,,story A,0,'); | 63 'label A,,,,,,story A,0,'); |
64 assert.strictEqual(csv[2], | 64 assert.strictEqual(csv[2], |
65 'hist1,σ,,,,,0,-Infinity,Infinity,,0,,,,,,Value,,,,,,,,'); | 65 'hist1,σ,,0,-Infinity,Infinity,,,,,0,,,,,,Value,,,,,,,,'); |
66 assert.strictEqual(csv[3], | 66 assert.strictEqual(csv[3], |
67 'hist2,,,,,,0,-Infinity,Infinity,,0,,benchmark A,,,,' + | 67 'hist2,,,0,-Infinity,Infinity,,,,,0,,benchmark A,,,,benchmark A' + |
68 'benchmark A,,,,,,,,'); | 68 ',,,,,,,,'); |
69 assert.strictEqual(csv[4], ''); | 69 assert.strictEqual(csv[4], ''); |
70 }); | 70 }); |
71 }); | 71 }); |
72 </script> | 72 </script> |
OLD | NEW |