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

Unified Diff: tracing/tracing/value/ui/histogram_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, 4 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/value/ui/histogram_span_test.html
diff --git a/tracing/tracing/value/ui/histogram_span_test.html b/tracing/tracing/value/ui/histogram_span_test.html
index faddbe4494f86dee33021eaa87fea1f7a4e9d37c..85dfec6958c41d29570544d885aa0cbc2912878c 100644
--- a/tracing/tracing/value/ui/histogram_span_test.html
+++ b/tracing/tracing/value/ui/histogram_span_test.html
@@ -17,18 +17,17 @@ found in the LICENSE file.
tr.b.unittest.testSuite(function() {
test('basic', function() {
var h = new tr.v.Histogram(tr.v.Unit.byName.unitlessNumber);
- h.add(-1, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('a')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('b')}));
- h.add(0, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
- h.add(500, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
- h.add(999, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('d')}));
- h.add(1000, tr.v.d.DiagnosticMap.fromObject(
- {foo: new tr.v.d.Generic('d')}));
+ h.addSample(-1, {foo: new tr.v.d.Generic('a')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('b')});
+ h.addSample(0, {foo: new tr.v.d.Generic('c')});
+ h.addSample(500, {foo: new tr.v.d.Generic('c')});
+ h.addSample(999, {foo: new tr.v.d.Generic('d')});
+ h.addSample(1000, {foo: new tr.v.d.Generic('d')});
var span = document.createElement('tr-v-ui-histogram-span');
span.histogram = h;
@@ -51,9 +50,8 @@ tr.b.unittest.testSuite(function() {
test('nans', function() {
var h = new tr.v.Histogram(tr.v.Unit.byName.unitlessNumber);
- h.add(undefined, tr.v.d.DiagnosticMap.fromObject(
- {foo: new tr.v.d.Generic('b')}));
- h.add(NaN, tr.v.d.DiagnosticMap.fromObject({foo: new tr.v.d.Generic('c')}));
+ h.addSample(undefined, {foo: new tr.v.d.Generic('b')});
+ h.addSample(NaN, {foo: new tr.v.d.Generic('c')});
h.customizeSummaryOptions({nans: true});
var span = document.createElement('tr-v-ui-histogram-span');
« no previous file with comments | « tracing/tracing/value/ui/composition_span_test.html ('k') | tracing/tracing/value/ui/numeric_stats_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698