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

Side by Side Diff: tracing/tracing/extras/importer/trace_event_importer_test.html

Issue 2332213008: Revert of Revert "[Clock sync] Use clock sync manager to convert trace event timestamps" (Closed)
Patch Set: Enable blink.console Created 4 years, 3 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
« no previous file with comments | « tracing/tracing/extras/importer/trace_event_importer.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 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/base/time_display_modes.html"> 8 <link rel="import" href="/tracing/base/time_display_modes.html">
9 <link rel="import" href="/tracing/base/unit.html"> 9 <link rel="import" href="/tracing/base/unit.html">
10 <link rel="import" href="/tracing/core/test_utils.html"> 10 <link rel="import" href="/tracing/core/test_utils.html">
11 <link rel="import" href="/tracing/extras/importer/battor_importer.html">
11 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> 12 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
12 <link rel="import" href="/tracing/extras/measure/measure.html"> 13 <link rel="import" href="/tracing/extras/measure/measure.html">
13 <link rel="import" href="/tracing/importer/import.html"> 14 <link rel="import" href="/tracing/importer/import.html">
14 <link rel="import" href="/tracing/model/container_memory_dump.html"> 15 <link rel="import" href="/tracing/model/container_memory_dump.html">
15 <link rel="import" href="/tracing/model/memory_dump_test_utils.html"> 16 <link rel="import" href="/tracing/model/memory_dump_test_utils.html">
16 <link rel="import" href="/tracing/model/scoped_id.html"> 17 <link rel="import" href="/tracing/model/scoped_id.html">
17 <link rel="import" href="/tracing/model/vm_region.html"> 18 <link rel="import" href="/tracing/model/vm_region.html">
18 <link rel="import" href="/tracing/value/numeric.html"> 19 <link rel="import" href="/tracing/value/numeric.html">
19 20
20 <script> 21 <script>
(...skipping 5246 matching lines...) Expand 10 before | Expand all | Expand 10 after
5267 '0.3 1070.0 3987.8\n' + 5268 '0.3 1070.0 3987.8\n' +
5268 '0.4 1017.7 3994.8\n'; 5269 '0.4 1017.7 3994.8\n';
5269 5270
5270 var eventData = { 5271 var eventData = {
5271 traceEvents: [ 5272 traceEvents: [
5272 { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'B', sf: 7 }, // @suppress longLineCheck 5273 { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'B', sf: 7 }, // @suppress longLineCheck
5273 { name: 'b', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 2, ph: 'E', sf: 8 } // @suppress longLineCheck 5274 { name: 'b', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 2, ph: 'E', sf: 8 } // @suppress longLineCheck
5274 ], 5275 ],
5275 powerTraceAsString: battorLog 5276 powerTraceAsString: battorLog
5276 }; 5277 };
5277 5278 var m = new tr.Model();
5278 var m = makeModel(eventData);
5279 var importer = new tr.e.importer.TraceEventImporter(m, eventData); 5279 var importer = new tr.e.importer.TraceEventImporter(m, eventData);
5280 var subTraces = importer.extractSubtraces(); 5280 var subTraces = importer.extractSubtraces();
5281 assert.isTrue(subTraces instanceof Array); 5281 assert.isTrue(subTraces instanceof Array);
5282 assert.equal(subTraces.length, 1); 5282 assert.equal(subTraces.length, 1);
5283 assert.equal(subTraces[0], battorLog); 5283 assert.equal(subTraces[0], battorLog);
5284 }); 5284 });
5285 5285
5286 test('metadataParsing', function() { 5286 test('metadataParsing', function() {
5287 var metadataValue = {value: {}}; 5287 var metadataValue = {value: {}};
5288 var eventData = { 5288 var eventData = {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 var m = makeModel(events); 5745 var m = makeModel(events);
5746 5746
5747 assert.isTrue(m.hasImportWarnings); 5747 assert.isTrue(m.hasImportWarnings);
5748 }); 5748 });
5749 5749
5750 // TODO(nduca): one slice, two threads 5750 // TODO(nduca): one slice, two threads
5751 // TODO(nduca): one slice, two pids 5751 // TODO(nduca): one slice, two pids
5752 5752
5753 }); 5753 });
5754 </script> 5754 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/extras/importer/trace_event_importer.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698