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

Side by Side Diff: tracing/tracing/value/ui/numeric_stats_span_test.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
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 test('instantiate', function() { 15 test('instantiate', function() {
16 var span = document.createElement('tr-v-ui-numeric-stats-span'); 16 var span = document.createElement('tr-v-ui-numeric-stats-span');
17 17
18 var numeric = new tr.v.Histogram(tr.v.Unit.byName.count); 18 var numeric = new tr.v.Histogram(tr.v.Unit.byName.count);
19 for (var i = 0; i < 1e2; ++i) { 19 for (var i = 0; i < 1e2; ++i) {
20 numeric.add(Math.random() * 1000); 20 numeric.addSample(Math.random() * 1000);
21 } 21 }
22 22
23 numeric.add('foo'); 23 numeric.addSample('foo');
24 numeric.customizeSummaryOptions({nans: true}); 24 numeric.customizeSummaryOptions({nans: true});
25 25
26 span.numeric = numeric; 26 span.numeric = numeric;
27 this.addHTMLOutput(span); 27 this.addHTMLOutput(span);
28 }); 28 });
29 }); 29 });
30 </script> 30 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/histogram_span_test.html ('k') | tracing/tracing/value/ui/value_set_table_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698