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

Side by Side Diff: tracing/tracing/metrics/tracing_metric_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/core/test_utils.html"> 8 <link rel="import" href="/tracing/core/test_utils.html">
9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> 9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
10 <link rel="import" href="/tracing/metrics/tracing_metric.html"> 10 <link rel="import" href="/tracing/metrics/tracing_metric.html">
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 {name: 'ProcessDumps', pid: 1, ts: 550, tid: 1, ph: 'X', cat: MEMORY_INFRA _TRACING_CATEGORY, args: {guid: 4}, dur: 8}, // @suppress longLineCheck 130 {name: 'ProcessDumps', pid: 1, ts: 550, tid: 1, ph: 'X', cat: MEMORY_INFRA _TRACING_CATEGORY, args: {guid: 4}, dur: 8}, // @suppress longLineCheck
131 {name: 'ProcessDumps', pid: 2, ts: 540, tid: 2, ph: 'X', cat: MEMORY_INFRA _TRACING_CATEGORY, args: {guid: 4}, dur: 18}, // @suppress longLineCheck 131 {name: 'ProcessDumps', pid: 2, ts: 540, tid: 2, ph: 'X', cat: MEMORY_INFRA _TRACING_CATEGORY, args: {guid: 4}, dur: 18}, // @suppress longLineCheck
132 {name: 'thread_name', pid: 1, ts: 0, tid: 1, ph: 'M', cat: '__metadata', a rgs: {name: 'CrBrowsermain'}}, // @suppress longLineCheck 132 {name: 'thread_name', pid: 1, ts: 0, tid: 1, ph: 'M', cat: '__metadata', a rgs: {name: 'CrBrowsermain'}}, // @suppress longLineCheck
133 {name: 'thread_name', pid: 1, ts: 0, tid: 7, ph: 'M', cat: '__metadata', a rgs: {name: 'MemoryInfra'}}, // @suppress longLineCheck 133 {name: 'thread_name', pid: 1, ts: 0, tid: 7, ph: 'M', cat: '__metadata', a rgs: {name: 'MemoryInfra'}}, // @suppress longLineCheck
134 {name: 'thread_name', pid: 2, ts: 0, tid: 2, ph: 'M', cat: '__metadata', a rgs: {name: 'CrRendererMain'}}, // @suppress longLineCheck 134 {name: 'thread_name', pid: 2, ts: 0, tid: 2, ph: 'M', cat: '__metadata', a rgs: {name: 'CrRendererMain'}}, // @suppress longLineCheck
135 {name: 'thread_name', pid: 2, ts: 0, tid: 8, ph: 'M', cat: '__metadata', a rgs: {name: 'MemoryInfra'}}, // @suppress longLineCheck 135 {name: 'thread_name', pid: 2, ts: 0, tid: 8, ph: 'M', cat: '__metadata', a rgs: {name: 'MemoryInfra'}}, // @suppress longLineCheck
136 {name: 'thread_name', pid: 2, ts: 0, tid: 3, ph: 'M', cat: '__metadata', a rgs: {name: 'Compositor'}} // @suppress longLineCheck 136 {name: 'thread_name', pid: 2, ts: 0, tid: 3, ph: 'M', cat: '__metadata', a rgs: {name: 'Compositor'}} // @suppress longLineCheck
137 ]; 137 ];
138 138
139 var model = makeModel(JSON.stringify(events), true); 139 var model = makeModel(JSON.stringify(events), true);
140 tr.model.MemoryDumpTestUtils.addGlobalMemoryDump(model, 550); 140 tr.model.MemoryDumpTestUtils.addGlobalMemoryDump(model, {ts: 550});
141 tr.metrics.tracingMetric(allValues, model); 141 tr.metrics.tracingMetric(allValues, model);
142 142
143 var memoryCategorySize = events.filter( 143 var memoryCategorySize = events.filter(
144 slice => slice['cat'] === MEMORY_INFRA_TRACING_CATEGORY).reduce( 144 slice => slice['cat'] === MEMORY_INFRA_TRACING_CATEGORY).reduce(
145 (acc, slice) => acc + JSON.stringify(slice).length, 0); 145 (acc, slice) => acc + JSON.stringify(slice).length, 0);
146 var totalSizeValue = allValues.getValuesWithName( 146 var totalSizeValue = allValues.getValuesWithName(
147 'Total trace size of memory-infra dumps in bytes'); 147 'Total trace size of memory-infra dumps in bytes');
148 assert.lengthOf(totalSizeValue, 1); 148 assert.lengthOf(totalSizeValue, 1);
149 assert.strictEqual(totalSizeValue[0].numeric.value, memoryCategorySize); 149 assert.strictEqual(totalSizeValue[0].numeric.value, memoryCategorySize);
150 var sizePerDumpValue = allValues.getValuesWithName( 150 var sizePerDumpValue = allValues.getValuesWithName(
(...skipping 12 matching lines...) Expand all
163 checkDurationValue(allValues, 163 checkDurationValue(allValues,
164 'Average CPU overhead on non-memory-infra threads per memory-infra ' + 164 'Average CPU overhead on non-memory-infra threads per memory-infra ' +
165 'dump', 165 'dump',
166 47); 166 47);
167 checkDurationValue(allValues, 167 checkDurationValue(allValues,
168 'Average CPU overhead on all threads per memory-infra dump', 91); 168 'Average CPU overhead on all threads per memory-infra dump', 91);
169 }); 169 });
170 170
171 }); 171 });
172 </script> 172 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/webview_startup_metric.html ('k') | tracing/tracing/metrics/v8/execution_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698