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

Side by Side Diff: tracing/tracing/value/ui/numeric_stats_span_test.html

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (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/value/histogram.html"> 8 <link rel="import" href="/tracing/value/histogram.html">
9 <link rel="import" href="/tracing/value/ui/numeric_stats_span.html"> 9 <link rel="import" href="/tracing/value/ui/numeric_stats_span.html">
10 10
11 <script> 11 <script>
12 'use strict'; 12 'use strict';
13 13
14 tr.b.unittest.testSuite(function() { 14 tr.b.unittest.testSuite(function() {
15 var TEST_NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
16 tr.v.Unit.byName.timeDurationInMs, tr.b.Range.fromExplicitRange(0, 1000),
17 20);
18
19 test('instantiate', function() { 15 test('instantiate', function() {
20 var span = document.createElement('tr-v-ui-numeric-stats-span'); 16 var span = document.createElement('tr-v-ui-numeric-stats-span');
21 17
22 var numeric = TEST_NUMERIC_BUILDER.build(); 18 var numeric = new tr.v.Histogram(tr.v.Unit.byName.count);
23 for (var i = 0; i < 1e2; ++i) { 19 for (var i = 0; i < 1e2; ++i) {
24 numeric.add(Math.random() * 1000); 20 numeric.add(Math.random() * 1000);
25 } 21 }
26 22
27 numeric.add('foo'); 23 numeric.add('foo');
28 numeric.customizeSummaryOptions({nans: true}); 24 numeric.customizeSummaryOptions({nans: true});
29 25
30 span.numeric = numeric; 26 span.numeric = numeric;
31 this.addHTMLOutput(span); 27 this.addHTMLOutput(span);
32 }); 28 });
33 }); 29 });
34 </script> 30 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/histogram_span_test.html ('k') | tracing/tracing/value/ui/related_value_map_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698