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

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

Issue 1241653002: Factor cpu profile tree into separate element and expose allocation tracing UI (Closed) Base URL: git@github.com:dart-lang/sdk.git@expose_allocation_profile_service
Patch Set: Created 5 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 <link rel="import" href="../../../../packages/polymer/polymer.html"> 1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="code_ref.html"> 2 <link rel="import" href="code_ref.html">
3 <link rel="import" href="function_ref.html"> 3 <link rel="import" href="function_ref.html">
4 <link rel="import" href="nav_bar.html"> 4 <link rel="import" href="nav_bar.html">
5 <link rel="import" href="observatory_element.html"> 5 <link rel="import" href="observatory_element.html">
6 <link rel="import" href="sliding_checkbox.html"> 6 <link rel="import" href="sliding_checkbox.html">
7 <link rel="import" href="view_footer.html"> 7 <link rel="import" href="view_footer.html">
8 8
9 <polymer-element name="cpu-profile-tree" extends="observatory-element">
10 <template>
11 <link rel="stylesheet" href="css/shared.css">
12 <style>
13 .infoBox {
14 position: absolute;
15 top: 100%;
16 left: 0%;
17 z-index: 999;
18 opacity: 1;
19 padding: 1em;
20 background-color: #ffffff;
21 border-left: solid 2px #ECECEC;
22 border-bottom: solid 2px #ECECEC;
23 border-right: solid 2px #ECECEC;
24 }
25 .full-width {
26 width: 100%;
27 }
28 .tree {
29 border-spacing: 0px;
30 width: 100%;
31 margin-bottom: 20px
32 vertical-align: middle;
33 }
34 .tree tbody tr {
35 animation: fadeIn 0.5s;
36 -moz-animation: fadeIn 0.5s;
37 -webkit-animation: fadeIn 0.5s;
38 }
39 .tree tbody tr:hover {
40 background-color: #FAFAFA;
41 }
42 .tree tr td:first-child,
43 .tree tr th:first-child {
44 width: 100%;
45 }
46 .tree thead > tr > th {
47 padding: 8px;
48 vertical-align: bottom;
49 text-align: left;
50 border-bottom: 1px solid #ddd;
51 }
52 tr {
53 background-color: #FFFFFF;
54 }
55 tbody tr {
56 animation: fadeIn 0.5s;
57 -moz-animation: fadeIn 0.5s;
58 -webkit-animation: fadeIn 0.5s;
59 }
60 tbody tr:hover {
61 background-color: #FAFAFA;
62 }
63 tr td:first-child,
64 tr th:first-child {
65 width: 100%;
66 }
67 </style>
68 <table class="full-width tree">
69 <thead id="treeHeader">
70 <tr>
71 <th>Method</th>
72 <th>Executing</th>
73 </tr>
74 </thead>
75 <tbody id="treeBody">
76 </tbody>
77 </table>
78 </template>
79 </polymer-element>
80
9 <polymer-element name="cpu-profile-table" extends="observatory-element"> 81 <polymer-element name="cpu-profile-table" extends="observatory-element">
10 <template> 82 <template>
11 <link rel="stylesheet" href="css/shared.css"> 83 <link rel="stylesheet" href="css/shared.css">
12 <nav-bar> 84 <nav-bar>
13 <top-nav-menu></top-nav-menu> 85 <top-nav-menu></top-nav-menu>
14 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu> 86 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu>
15 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu> 87 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu>
16 <nav-menu link="{{ makeLink('/profiler-table', isolate) }}" anchor="cpu pr ofile (table)" last="{{ true }}"></nav-menu> 88 <nav-menu link="{{ makeLink('/profiler-table', isolate) }}" anchor="cpu pr ofile (table)" last="{{ true }}"></nav-menu>
17 <nav-refresh callback="{{ refresh }}"></nav-refresh> 89 <nav-refresh callback="{{ refresh }}"></nav-refresh>
18 <nav-refresh callback="{{ clearCpuProfile }}" label="Clear"></nav-refresh> 90 <nav-refresh callback="{{ clearCpuProfile }}" label="Clear"></nav-refresh>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 <template if="{{ focusedFunction != null }}"> 334 <template if="{{ focusedFunction != null }}">
263 <span>Filtered tree: </span> 335 <span>Filtered tree: </span>
264 <function-ref ref="{{ focusedFunction }}"></function-ref> 336 <function-ref ref="{{ focusedFunction }}"></function-ref>
265 </template> 337 </template>
266 <template if="{{ focusedFunction == null }}"> 338 <template if="{{ focusedFunction == null }}">
267 <span>No focused function</span> 339 <span>No focused function</span>
268 </template> 340 </template>
269 </div> 341 </div>
270 <div class="flex-row centered"> 342 <div class="flex-row centered">
271 <div class="flex-item-90-percent outlined" style="margin: 16px; margin-lef t: 8px; margin-right: 8px"> 343 <div class="flex-item-90-percent outlined" style="margin: 16px; margin-lef t: 8px; margin-right: 8px">
272 <table class="full-width tree"> 344 <cpu-profile-tree id="cpuProfileTree"></cpu-profile-tree>
273 <thead id="treeHeader">
274 <tr>
275 <th>Method</th>
276 <th>Executing</th>
277 </tr>
278 </thead>
279 <tbody id="treeBody">
280 </tbody>
281 </table>
282 </div> 345 </div>
283 </div> 346 </div>
284 </template> 347 </template>
285 </polymer-element> 348 </polymer-element>
286 349
287 <polymer-element name="cpu-profile" extends="observatory-element"> 350 <polymer-element name="cpu-profile" extends="observatory-element">
288 <template> 351 <template>
289 <link rel="stylesheet" href="css/shared.css"> 352 <link rel="stylesheet" href="css/shared.css">
290 <nav-bar> 353 <nav-bar>
291 <top-nav-menu></top-nav-menu> 354 <top-nav-menu></top-nav-menu>
292 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu> 355 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu>
293 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu> 356 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu>
294 <nav-menu link="{{ makeLink('/profiler', isolate) }}" anchor="cpu profile" last="{{ true }}"></nav-menu> 357 <nav-menu link="{{ makeLink('/profiler', isolate) }}" anchor="cpu profile" last="{{ true }}"></nav-menu>
295 <nav-refresh callback="{{ refresh }}"></nav-refresh> 358 <nav-refresh callback="{{ refresh }}"></nav-refresh>
296 <nav-refresh callback="{{ clearCpuProfile }}" label="Clear"></nav-refresh> 359 <nav-refresh callback="{{ clearCpuProfile }}" label="Clear"></nav-refresh>
297 </nav-bar> 360 </nav-bar>
298 <style> 361 <style>
299 .tableWell { 362 .tableWell {
300 background-color: #ECECEC; 363 background-color: #ECECEC;
301 padding: 0.2em; 364 padding: 0.2em;
302 } 365 }
303
304 .table {
305 border-spacing: 0px;
306 width: 100%;
307 margin-bottom: 20px
308 vertical-align: middle;
309 }
310
311 tr {
312 background-color: #FFFFFF;
313 }
314
315 tbody tr {
316 animation: fadeIn 0.5s;
317 -moz-animation: fadeIn 0.5s;
318 -webkit-animation: fadeIn 0.5s;
319 }
320
321 tbody tr:hover {
322 background-color: #FAFAFA;
323 }
324
325 tr td:first-child,
326 tr th:first-child {
327 width: 100%;
328 }
329
330 .table thead > tr > th {
331 padding: 8px;
332 vertical-align: bottom;
333 text-align: left;
334 border-bottom: 1px solid #ddd;
335 }
336
337 .infoBox {
338 position: absolute;
339 top: 100%;
340 left: 0%;
341 z-index: 999;
342 opacity: 1;
343 padding: 1em;
344 background-color: #ffffff;
345 border-left: solid 2px #ECECEC;
346 border-bottom: solid 2px #ECECEC;
347 border-right: solid 2px #ECECEC;
348 }
349
350 .statusMessage { 366 .statusMessage {
351 font-size: 150%; 367 font-size: 150%;
352 font-weight: bold; 368 font-weight: bold;
353 } 369 }
354 370
355 .statusBox { 371 .statusBox {
356 height: 100%; 372 height: 100%;
357 padding: 1em; 373 padding: 1em;
358 } 374 }
359 375
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 <template if="{{ state == 'Loaded' && directionSelector == 'Up' }}"> 488 <template if="{{ state == 'Loaded' && directionSelector == 'Up' }}">
473 <br> 489 <br>
474 <div class="statusBox shadow"> 490 <div class="statusBox shadow">
475 <div>Tree is rooted at executing function / code.</div> 491 <div>Tree is rooted at executing function / code.</div>
476 <br> 492 <br>
477 <div>Child nodes are callers.</div> 493 <div>Child nodes are callers.</div>
478 </div> 494 </div>
479 </template> 495 </template>
480 <br><br> 496 <br><br>
481 <div class="tableWell shadow"> 497 <div class="tableWell shadow">
482 <table class="table"> 498 <cpu-profile-tree id="cpuProfileTree"></cpu-profile-tree>
483 <thead id="treeHeader">
484 <tr>
485 <th>Method</th>
486 <th>Executing</th>
487 </tr>
488 </thead>
489 <tbody id="treeBody">
490 </tbody>
491 </table>
492 </div> 499 </div>
493 </div> 500 </div>
494 <view-footer></view-footer> 501 <view-footer></view-footer>
495 </template> 502 </template>
496 </polymer-element> 503 </polymer-element>
497 504
498 <script type="application/dart" src="cpu_profile.dart"></script> 505 <script type="application/dart" src="cpu_profile.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698