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

Unified Diff: tracing/tracing/metrics/sample_metric.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/metrics/sample_metric.html
diff --git a/tracing/tracing/metrics/sample_metric.html b/tracing/tracing/metrics/sample_metric.html
index c5f15aa10b4513ba9757919bcf1ef39d5ab4a078..12e03b82f91842abe27cadca5c70e01825a6502a 100644
--- a/tracing/tracing/metrics/sample_metric.html
+++ b/tracing/tracing/metrics/sample_metric.html
@@ -16,8 +16,23 @@ found in the LICENSE file.
tr.exportTo('tr.metrics', function() {
function sampleMetric(values, model) {
var hist = new tr.v.Histogram(tr.v.Unit.byName.sizeInBytes_smallerIsBetter);
- hist.add(9);
- hist.add(91);
+ hist.addSample(9);
+ hist.addSample(91, {bar: new tr.v.d.Generic({hello: 42})});
+
+ for (var expectation of model.userModel.expectations) {
+ if (expectation instanceof tr.model.um.ResponseExpectation) {
+ } else if (expectation instanceof tr.model.um.AnimationExpectation) {
+ } else if (expectation instanceof tr.model.um.IdleExpectation) {
+ } else if (expectation instanceof tr.model.um.LoadExpectation) {
+ }
+ }
+
+ var chromeHelper = model.getOrCreateHelper(
+ tr.model.helpers.ChromeModelHelper);
+
+ tr.b.iterItems(model.processes, function(pid, process) {
+ });
+
values.addValue(new tr.v.NumericValue('foo', hist));
}

Powered by Google App Engine
This is Rietveld 408576698