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

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

Issue 1685683003: Implement Timeline Based Measurement v2 (Closed) Base URL: git@github.com:catapult-project/catapult.git@new_style_results
Patch Set: fix vinn tests Created 4 years, 10 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_registry.html » ('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/perf_insights/perf_insights/mappers/startup_map_function_test.html b/tracing/tracing/metrics/metric_map_function_test.html
similarity index 61%
copy from perf_insights/perf_insights/mappers/startup_map_function_test.html
copy to tracing/tracing/metrics/metric_map_function_test.html
index a06e6c2ed90ce17068ecfdc6e91933f669013ded..929fe853791f7e5caabf39cb34d8328d61b7607c 100644
--- a/perf_insights/perf_insights/mappers/startup_map_function_test.html
+++ b/tracing/tracing/metrics/metric_map_function_test.html
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
+Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<link rel="import" href="/perf_insights/mappers/startup_map_function.html">
<link rel="import" href="/perf_insights/mre/mre_result.html">
<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/user_model/load_expectation.html">
+<link rel="import" href="/tracing/metrics/metric_map_function.html">
+<link rel="import" href="/tracing/metrics/sample_metric.html">
<script>
'use strict';
@@ -17,7 +17,7 @@ tr.b.unittest.testSuite(function() {
var test_utils = tr.c.TestUtils;
var ThreadSlice = tr.model.ThreadSlice;
- test('startupMapFunctionTest', function() {
+ test('metricMapTest', function() {
var m = test_utils.newModel(function(m) {
var p1 = m.getOrCreateProcess(1);
var t2 = p1.getOrCreateThread(2);
@@ -31,17 +31,13 @@ tr.b.unittest.testSuite(function() {
name: 'some_slice',
start: 20, end: 30
}));
-
- var loadIr = new tr.model.um.LoadExpectation(
- m, tr.model.um.LOAD_SUBTYPE_NAMES.STARTUP, 0, 10);
- m.userModel.expectations.push(loadIr);
- loadIr.associatedEvents.push(t2_s1);
- loadIr.associatedEvents.push(t2_s2);
});
+ m.canonicalUrlThatCreatedThisTrace = '/foo.json';
+
var result = new pi.mre.MreResult();
- pi.m.startupMapFunctionForTest(result, m);
+ tr.metrics.metricMapFunction(result, m);
+ assert.property(result.pairs, 'values');
});
});
-
</script>
« no previous file with comments | « tracing/tracing/metrics/metric_map_function.html ('k') | tracing/tracing/metrics/metric_registry.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698