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

Side by Side Diff: runtime/observatory/lib/src/elements/cpu_profile.dart

Issue 1267033002: Make Observatory analyzer clean (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | runtime/observatory/tests/service/async_next_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library cpu_profile_element; 5 library cpu_profile_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 /// Displays a CpuProfile 556 /// Displays a CpuProfile
557 @CustomTag('cpu-profile') 557 @CustomTag('cpu-profile')
558 class CpuProfileElement extends ObservatoryElement { 558 class CpuProfileElement extends ObservatoryElement {
559 CpuProfileElement.created() : super.created() { 559 CpuProfileElement.created() : super.created() {
560 _updateTask = new Task(update); 560 _updateTask = new Task(update);
561 _renderTask = new Task(render); 561 _renderTask = new Task(render);
562 } 562 }
563 563
564 attached() { 564 attached() {
565 super.attached(); 565 super.attached();
566 sampleBufferControlElement = shadowRoot.query('#sampleBufferControl'); 566 sampleBufferControlElement =
567 shadowRoot.querySelector('#sampleBufferControl');
567 assert(sampleBufferControlElement != null); 568 assert(sampleBufferControlElement != null);
568 sampleBufferControlElement.onSampleBufferUpdate = onSampleBufferChange; 569 sampleBufferControlElement.onSampleBufferUpdate = onSampleBufferChange;
569 stackTraceTreeConfigElement = shadowRoot.query('#stackTraceTreeConfig'); 570 stackTraceTreeConfigElement =
571 shadowRoot.querySelector('#stackTraceTreeConfig');
570 assert(stackTraceTreeConfigElement != null); 572 assert(stackTraceTreeConfigElement != null);
571 stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange; 573 stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange;
572 cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree'); 574 cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree');
573 assert(cpuProfileTreeElement != null); 575 assert(cpuProfileTreeElement != null);
574 cpuProfileTreeElement.profile = sampleBufferControlElement.profile; 576 cpuProfileTreeElement.profile = sampleBufferControlElement.profile;
575 _updateTask.queue(); 577 _updateTask.queue();
576 } 578 }
577 579
578 isolateChanged(oldValue) { 580 isolateChanged(oldValue) {
579 _updateTask.queue(); 581 _updateTask.queue();
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 new SortedTableColumn.withFormatter('Callers (%)', 764 new SortedTableColumn.withFormatter('Callers (%)',
763 Utils.formatPercentNormalized), 765 Utils.formatPercentNormalized),
764 new SortedTableColumn('Method') 766 new SortedTableColumn('Method')
765 ]; 767 ];
766 profileCallersTable = new NameSortedTable(columns); 768 profileCallersTable = new NameSortedTable(columns);
767 profileCallersTable.sortColumnIndex = 0; 769 profileCallersTable.sortColumnIndex = 0;
768 } 770 }
769 771
770 attached() { 772 attached() {
771 super.attached(); 773 super.attached();
772 sampleBufferControlElement = shadowRoot.query('#sampleBufferControl'); 774 sampleBufferControlElement =
775 shadowRoot.querySelector('#sampleBufferControl');
773 assert(sampleBufferControlElement != null); 776 assert(sampleBufferControlElement != null);
774 sampleBufferControlElement.onSampleBufferUpdate = onSampleBufferChange; 777 sampleBufferControlElement.onSampleBufferUpdate = onSampleBufferChange;
775 // Disable the tag selector- we always want no tags. 778 // Disable the tag selector- we always want no tags.
776 sampleBufferControlElement.tagSelector = 'None'; 779 sampleBufferControlElement.tagSelector = 'None';
777 sampleBufferControlElement.showTagSelector = false; 780 sampleBufferControlElement.showTagSelector = false;
778 stackTraceTreeConfigElement = shadowRoot.query('#stackTraceTreeConfig'); 781 stackTraceTreeConfigElement =
782 shadowRoot.querySelector('#stackTraceTreeConfig');
779 assert(stackTraceTreeConfigElement != null); 783 assert(stackTraceTreeConfigElement != null);
780 stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange; 784 stackTraceTreeConfigElement.onTreeConfigChange = onTreeConfigChange;
781 stackTraceTreeConfigElement.modeSelector = 'Function'; 785 stackTraceTreeConfigElement.modeSelector = 'Function';
782 stackTraceTreeConfigElement.showModeSelector = false; 786 stackTraceTreeConfigElement.showModeSelector = false;
783 stackTraceTreeConfigElement.directionSelector = 'Down'; 787 stackTraceTreeConfigElement.directionSelector = 'Down';
784 stackTraceTreeConfigElement.showDirectionSelector = false; 788 stackTraceTreeConfigElement.showDirectionSelector = false;
785 cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree'); 789 cpuProfileTreeElement = shadowRoot.querySelector('#cpuProfileTree');
786 assert(cpuProfileTreeElement != null); 790 assert(cpuProfileTreeElement != null);
787 cpuProfileTreeElement.profile = sampleBufferControlElement.profile; 791 cpuProfileTreeElement.profile = sampleBufferControlElement.profile;
788 _updateTask.queue(); 792 _updateTask.queue();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 return; 1169 return;
1166 } 1170 }
1167 var tree = profile.loadCodeTree(exclusive ? 'exclusive' : 'inclusive'); 1171 var tree = profile.loadCodeTree(exclusive ? 'exclusive' : 'inclusive');
1168 if (tree == null) { 1172 if (tree == null) {
1169 return; 1173 return;
1170 } 1174 }
1171 var rootRow = new CodeProfileTreeRow(codeTree, null, profile, tree.root); 1175 var rootRow = new CodeProfileTreeRow(codeTree, null, profile, tree.root);
1172 codeTree.initialize(rootRow); 1176 codeTree.initialize(rootRow);
1173 } 1177 }
1174 } 1178 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/tests/service/async_next_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698