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

Unified Diff: tracing/tracing/metrics/metric_map_function_test.html

Issue 2110683010: Allow benchmarks to specify running multiple metrics. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix discover test Created 4 years, 5 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/metric_map_function_test.html
diff --git a/tracing/tracing/metrics/metric_map_function_test.html b/tracing/tracing/metrics/metric_map_function_test.html
index f66ed23949cfc95302d89b4c0a586a971545b4b1..bcad300c0cda740c781e2acd13ff78c786886b6b 100644
--- a/tracing/tracing/metrics/metric_map_function_test.html
+++ b/tracing/tracing/metrics/metric_map_function_test.html
@@ -46,16 +46,23 @@ tr.b.unittest.testSuite(function() {
assert.throw(function() {
var result = new pi.mre.MreResult();
tr.metrics.metricMapFunction(result, m, {});
- }, Error, 'A metric name should be specified.');
+ }, Error, 'Metric names should be specified.');
assert.throw(function() {
var result = new pi.mre.MreResult();
- tr.metrics.metricMapFunction(result, m, {'metric': 'wrongMetric'});
+ tr.metrics.metricMapFunction(result, m, {'metrics': ['wrongMetric']});
}, Error, '"wrongMetric" is not a registered metric.');
var result = new pi.mre.MreResult();
- tr.metrics.metricMapFunction(result, m, {'metric': 'sampleMetric'});
+ tr.metrics.metricMapFunction(result, m, {'metrics': ['sampleMetric']});
assert.property(result.pairs, 'values');
+ assert.equal(result.pairs.values.length, 9);
+
+ var resTwo = new pi.mre.MreResult();
charliea (OOO until 10-5) 2016/07/06 19:52:41 nit1: We usually don't spell out numbers in variab
alexandermont 2016/07/06 20:06:55 Done
+ tr.metrics.metricMapFunction(resTwo, m, {'metrics': ['sampleMetric',
charliea (OOO until 10-5) 2016/07/06 19:52:41 nit: In javascript, we don't line up array values
alexandermont 2016/07/06 20:06:55 Done
+ 'sampleMetricTwo']});
+ assert.property(resTwo.pairs, 'values');
+ console.log(resTwo.pairs.values.length, 18);
});
});
</script>

Powered by Google App Engine
This is Rietveld 408576698