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

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

Issue 2991203002: Fix Observatory virtual-collection layout issues (Closed)
Patch Set: Fix persistent handles page Created 3 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/lib/src/elements/containers/virtual_collection.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:html'; 6 import 'dart:html';
7 import 'package:charted/charted.dart'; 7 import 'package:charted/charted.dart';
8 import "package:charted/charts/charts.dart"; 8 import "package:charted/charts/charts.dart";
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/class_ref.dart'; 10 import 'package:observatory/src/elements/class_ref.dart';
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 ..text = '0', 349 ..text = '0',
350 new SpanElement() 350 new SpanElement()
351 ..classes = ['bytes'] 351 ..classes = ['bytes']
352 ..text = '0B', 352 ..text = '0B',
353 new SpanElement() 353 new SpanElement()
354 ..classes = ['instances'] 354 ..classes = ['instances']
355 ..text = '0', 355 ..text = '0',
356 new SpanElement()..classes = ['name'] 356 new SpanElement()..classes = ['name']
357 ]; 357 ];
358 358
359 Element _createCollectionHeader() => new DivElement() 359 List<HtmlElement> _createCollectionHeader() => [
360 ..children = [ 360 new DivElement()
361 new DivElement() 361 ..classes = ['collection-item']
362 ..classes = ['collection-item'] 362 ..children = [
363 ..children = [ 363 new SpanElement()
364 new SpanElement() 364 ..classes = ['group']
365 ..classes = ['group'] 365 ..text = 'Accumulated',
366 ..text = 'Accumulated', 366 new SpanElement()
367 new SpanElement() 367 ..classes = ['group']
368 ..classes = ['group'] 368 ..text = 'Current',
369 ..text = 'Current', 369 new SpanElement()
370 new SpanElement() 370 ..classes = ['group']
371 ..classes = ['group'] 371 ..text = '(NEW) Accumulated',
372 ..text = '(NEW) Accumulated', 372 new SpanElement()
373 new SpanElement() 373 ..classes = ['group']
374 ..classes = ['group'] 374 ..text = '(NEW) Current',
375 ..text = '(NEW) Current', 375 new SpanElement()
376 new SpanElement() 376 ..classes = ['group']
377 ..classes = ['group'] 377 ..text = '(OLD) Accumulated',
378 ..text = '(OLD) Accumulated', 378 new SpanElement()
379 new SpanElement() 379 ..classes = ['group']
380 ..classes = ['group'] 380 ..text = '(OLD) Current',
381 ..text = '(OLD) Current', 381 ],
382 ], 382 new DivElement()
383 new DivElement() 383 ..classes = ['collection-item']
384 ..classes = ['collection-item'] 384 ..children = [
385 ..children = [ 385 _createHeaderButton(const ['bytes'], 'Size',
386 _createHeaderButton(const ['bytes'], 'Size', 386 _SortingField.accumulatedSize, _SortingDirection.descending),
387 _SortingField.accumulatedSize, _SortingDirection.descending), 387 _createHeaderButton(
388 _createHeaderButton(const ['instances'], 'Instances', 388 const ['instances'],
389 _SortingField.accumulatedInstances, _SortingDirection.descending), 389 'Instances',
390 _createHeaderButton(const ['bytes'], 'Size', 390 _SortingField.accumulatedInstances,
391 _SortingField.currentSize, _SortingDirection.descending), 391 _SortingDirection.descending),
392 _createHeaderButton(const ['instances'], 'Instances', 392 _createHeaderButton(const ['bytes'], 'Size',
393 _SortingField.currentInstances, _SortingDirection.descending), 393 _SortingField.currentSize, _SortingDirection.descending),
394 _createHeaderButton(const ['bytes'], 'Size', 394 _createHeaderButton(const ['instances'], 'Instances',
395 _SortingField.newAccumulatedSize, _SortingDirection.descending), 395 _SortingField.currentInstances, _SortingDirection.descending),
396 _createHeaderButton( 396 _createHeaderButton(const ['bytes'], 'Size',
397 const ['instances'], 397 _SortingField.newAccumulatedSize, _SortingDirection.descending),
398 'Instances', 398 _createHeaderButton(
399 _SortingField.newAccumulatedInstances, 399 const ['instances'],
400 _SortingDirection.descending), 400 'Instances',
401 _createHeaderButton(const ['bytes'], 'Size', 401 _SortingField.newAccumulatedInstances,
402 _SortingField.newCurrentSize, _SortingDirection.descending), 402 _SortingDirection.descending),
403 _createHeaderButton(const ['instances'], 'Instances', 403 _createHeaderButton(const ['bytes'], 'Size',
404 _SortingField.newCurrentInstances, _SortingDirection.descending), 404 _SortingField.newCurrentSize, _SortingDirection.descending),
405 _createHeaderButton(const ['bytes'], 'Size', 405 _createHeaderButton(
406 _SortingField.oldAccumulatedSize, _SortingDirection.descending), 406 const ['instances'],
407 _createHeaderButton( 407 'Instances',
408 const ['instances'], 408 _SortingField.newCurrentInstances,
409 'Instances', 409 _SortingDirection.descending),
410 _SortingField.oldAccumulatedInstances, 410 _createHeaderButton(const ['bytes'], 'Size',
411 _SortingDirection.descending), 411 _SortingField.oldAccumulatedSize, _SortingDirection.descending),
412 _createHeaderButton(const ['bytes'], 'Size', 412 _createHeaderButton(
413 _SortingField.oldCurrentSize, _SortingDirection.descending), 413 const ['instances'],
414 _createHeaderButton(const ['instances'], 'Instances', 414 'Instances',
415 _SortingField.oldCurrentInstances, _SortingDirection.descending), 415 _SortingField.oldAccumulatedInstances,
416 _createHeaderButton(const ['name'], 'Class', _SortingField.className, 416 _SortingDirection.descending),
417 _SortingDirection.ascending) 417 _createHeaderButton(const ['bytes'], 'Size',
418 ], 418 _SortingField.oldCurrentSize, _SortingDirection.descending),
419 ]; 419 _createHeaderButton(
420 const ['instances'],
421 'Instances',
422 _SortingField.oldCurrentInstances,
423 _SortingDirection.descending),
424 _createHeaderButton(const ['name'], 'Class',
425 _SortingField.className, _SortingDirection.ascending)
426 ],
427 ];
420 428
421 ButtonElement _createHeaderButton(List<String> classes, String text, 429 ButtonElement _createHeaderButton(List<String> classes, String text,
422 _SortingField field, _SortingDirection direction) => 430 _SortingField field, _SortingDirection direction) =>
423 new ButtonElement() 431 new ButtonElement()
424 ..classes = classes 432 ..classes = classes
425 ..text = _sortingField != field 433 ..text = _sortingField != field
426 ? text 434 ? text
427 : _sortingDirection == _SortingDirection.ascending 435 : _sortingDirection == _SortingDirection.ascending
428 ? '$text▼' 436 ? '$text▼'
429 : '$text▲' 437 : '$text▲'
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 static int _getNewCurrentInstances(M.ClassHeapStats s) => 645 static int _getNewCurrentInstances(M.ClassHeapStats s) =>
638 s.newSpace.current.instances; 646 s.newSpace.current.instances;
639 static int _getOldAccumulatedSize(M.ClassHeapStats s) => 647 static int _getOldAccumulatedSize(M.ClassHeapStats s) =>
640 s.oldSpace.accumulated.bytes; 648 s.oldSpace.accumulated.bytes;
641 static int _getOldAccumulatedInstances(M.ClassHeapStats s) => 649 static int _getOldAccumulatedInstances(M.ClassHeapStats s) =>
642 s.oldSpace.accumulated.instances; 650 s.oldSpace.accumulated.instances;
643 static int _getOldCurrentSize(M.ClassHeapStats s) => s.oldSpace.current.bytes; 651 static int _getOldCurrentSize(M.ClassHeapStats s) => s.oldSpace.current.bytes;
644 static int _getOldCurrentInstances(M.ClassHeapStats s) => 652 static int _getOldCurrentInstances(M.ClassHeapStats s) =>
645 s.oldSpace.current.instances; 653 s.oldSpace.current.instances;
646 } 654 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/containers/virtual_collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698