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

Side by Side Diff: trace_processor/experimental/mappers/thread_grouping_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 (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="/perf_insights/mre/mre_result.html"> 8 <link rel="import" href="/perf_insights/mre/mre_result.html">
9 <link rel="import" href="/tracing/core/test_utils.html"> 9 <link rel="import" href="/tracing/core/test_utils.html">
10 <link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html"> 10 <link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html">
(...skipping 23 matching lines...) Expand all
34 m.otherProcessMain.sliceGroup.pushSlice(test_utils.newSliceEx({ 34 m.otherProcessMain.sliceGroup.pushSlice(test_utils.newSliceEx({
35 name: 'RendererSlice', 35 name: 'RendererSlice',
36 start: 0, duration: 10 36 start: 0, duration: 10
37 })); 37 }));
38 }); 38 });
39 39
40 var tg = new pi.m.ThreadGrouping(); 40 var tg = new pi.m.ThreadGrouping();
41 tg.autoInitUsingHelpers(m); 41 tg.autoInitUsingHelpers(m);
42 42
43 var allSlices = new tr.model.EventSet(); 43 var allSlices = new tr.model.EventSet();
44 m.iterateAllEvents(function(e) { 44 for (var e of m.getDescendantEvents())
45 if (e instanceof tr.model.Slice) 45 if (e instanceof tr.model.Slice)
46 allSlices.push(e); 46 allSlices.push(e);
47 });
48 var groups = tg.divideEventSetIntoSubGroups(allSlices); 47 var groups = tg.divideEventSetIntoSubGroups(allSlices);
49 var numGrouped = 0; 48 var numGrouped = 0;
50 tr.b.iterItems(groups, function(groupName, eventSet) { 49 tr.b.iterItems(groups, function(groupName, eventSet) {
51 numGrouped += eventSet.length; 50 numGrouped += eventSet.length;
52 }); 51 });
53 assert.equal(numGrouped, allSlices.length); 52 assert.equal(numGrouped, allSlices.length);
54 assert.equal(groups.Browser.length, 1); 53 assert.equal(groups.Browser.length, 1);
55 assert.equal(groups.Renderer.length, 1); 54 assert.equal(groups.Renderer.length, 1);
56 assert.equal(groups.Other.length, 1); 55 assert.equal(groups.Other.length, 1);
57 }); 56 });
58 }); 57 });
59 </script> 58 </script>
OLDNEW
« no previous file with comments | « trace_processor/experimental/mappers/thread_grouping.html ('k') | trace_processor/experimental/mappers/trace_import_cost.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698