OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 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 |
| 4 |
| 5 part of models; |
| 6 |
| 7 enum HeapSnapshotLoadingStatus { |
| 8 fetching, |
| 9 loading, |
| 10 loaded |
| 11 } |
| 12 |
| 13 bool isHeapSnapshotProgressRunning(HeapSnapshotLoadingStatus status) { |
| 14 switch (status) { |
| 15 case HeapSnapshotLoadingStatus.fetching: |
| 16 case HeapSnapshotLoadingStatus.loading: |
| 17 return true; |
| 18 default: |
| 19 return false; |
| 20 } |
| 21 } |
| 22 |
| 23 abstract class HeapSnapshotLoadingProgressEvent { |
| 24 HeapSnapshotLoadingProgress get progress; |
| 25 } |
| 26 |
| 27 abstract class HeapSnapshotLoadingProgress { |
| 28 HeapSnapshotLoadingStatus get status; |
| 29 String get stepDescription; |
| 30 double get progress; |
| 31 Duration get fetchingTime; |
| 32 Duration get loadingTime; |
| 33 HeapSnapshot get snapshot; |
| 34 } |
| 35 |
| 36 abstract class HeapSnapshotRepository { |
| 37 Stream<HeapSnapshotLoadingProgressEvent> get(IsolateRef isolate, |
| 38 {bool gc: false}); |
| 39 } |
OLD | NEW |