| 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 SampleProfileTag { |
| 8 userVM, |
| 9 userOnly, |
| 10 vmUser, |
| 11 vmOnly, |
| 12 none |
| 13 } |
| 14 |
| 15 enum SampleProfileLoadingStatus { |
| 16 disabled, |
| 17 fetching, |
| 18 loading, |
| 19 loaded |
| 20 } |
| 21 |
| 22 bool isSampleProcessRunning(SampleProfileLoadingStatus status) { |
| 23 switch (status) { |
| 24 case SampleProfileLoadingStatus.fetching: |
| 25 case SampleProfileLoadingStatus.loading: |
| 26 return true; |
| 27 default: |
| 28 return false; |
| 29 } |
| 30 } |
| 31 |
| 32 abstract class SampleProfileLoadingProgressEvent { |
| 33 SampleProfileLoadingProgress get progress; |
| 34 } |
| 35 |
| 36 abstract class SampleProfileLoadingProgress { |
| 37 SampleProfileLoadingStatus get status; |
| 38 double get progress; |
| 39 Duration get fetchingTime; |
| 40 Duration get loadingTime; |
| 41 SampleProfile get profile; |
| 42 } |
| 43 |
| 44 abstract class ClassSampleProfileRepository { |
| 45 Stream<SampleProfileLoadingProgressEvent> get(ClassRef cls, |
| 46 SampleProfileTag tag, {bool clear: false}); |
| 47 } |
| 48 |
| 49 abstract class IsolateSampleProfileRepository { |
| 50 Stream<SampleProfileLoadingProgressEvent> get(IsolateRef cls, |
| 51 SampleProfileTag tag, {bool clear: false, bool forceFetch: false}); |
| 52 } |
| OLD | NEW |