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

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 style some more 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
« no previous file with comments | « tracing/tracing/metrics/metric_map_function.html ('k') | tracing/tracing/metrics/metric_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2b2511b0e5d7975f6516b727b6fa4edb789c39a7 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 result2 = new pi.mre.MreResult();
+ tr.metrics.metricMapFunction(
+ result2, m, {'metrics': ['sampleMetric', 'sampleMetric2']});
+ assert.property(result2.pairs, 'values');
+ console.log(result2.pairs.values.length, 18);
});
});
</script>
« no previous file with comments | « tracing/tracing/metrics/metric_map_function.html ('k') | tracing/tracing/metrics/metric_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698