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

Unified Diff: tracing/tracing/value/numeric.html

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/histogram_test.html ('k') | tracing/tracing/value/ui/composition_span.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/numeric.html
diff --git a/tracing/tracing/value/numeric.html b/tracing/tracing/value/numeric.html
index cb36048b9b605a2825a1ad8208c56b6f2ed9839b..f2ba39ba52530a8395b7a61a4d7910fef7e30e82 100644
--- a/tracing/tracing/value/numeric.html
+++ b/tracing/tracing/value/numeric.html
@@ -23,32 +23,6 @@ tr.exportTo('tr.v', function() {
this.unit = unit;
}
- merge(other) {
- if (this.unit !== other.unit)
- throw new Error('Merging Numerics with different units');
-
- // Two Numerics that were built with the same boundaries
- // can be merged using addHistogram().
- if (this instanceof tr.v.Histogram && other instanceof tr.v.Histogram &&
- this.canAddHistogram(other)) {
- var result = this.clone();
- result.addHistogram(other.clone());
- return result;
- }
-
- // Either a Scalar and a Histogram, or two Scalars...
- // or two Numerics that were not built with the same boundaries should be
- // built from their raw samples.
- var samples = [];
- this.sampleValuesInto(samples);
- other.sampleValuesInto(samples);
- return tr.v.Histogram.buildFromSamples(this.unit, samples);
- }
-
- sampleValuesInto(samples) {
- throw new Error('Not implemented');
- }
-
asDict() {
var d = {
unit: this.unit.asJSON()
@@ -62,9 +36,6 @@ tr.exportTo('tr.v', function() {
if (d.type === 'scalar')
return ScalarNumeric.fromDict(d);
- if (d.type === 'numeric')
- return tr.v.Histogram.fromDict(d);
-
throw new Error('Not implemented');
}
}
@@ -96,10 +67,6 @@ tr.exportTo('tr.v', function() {
d.value = this.value;
}
- sampleValuesInto(samples) {
- samples.push(this.value);
- }
-
toString() {
return this.unit.format(this.value);
}
« no previous file with comments | « tracing/tracing/value/histogram_test.html ('k') | tracing/tracing/value/ui/composition_span.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698