| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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 part of models; | 5 part of models; |
| 6 | 6 |
| 7 enum SampleProfileTag { userVM, userOnly, vmUser, vmOnly, none } | 7 enum SampleProfileTag { userVM, userOnly, vmUser, vmOnly, none } |
| 8 | 8 |
| 9 enum SampleProfileLoadingStatus { disabled, fetching, loading, loaded } | 9 enum SampleProfileLoadingStatus { disabled, fetching, loading, loaded } |
| 10 | 10 |
| 11 enum SampleProfileType { cpu, memory } |
| 12 |
| 11 bool isSampleProcessRunning(SampleProfileLoadingStatus status) { | 13 bool isSampleProcessRunning(SampleProfileLoadingStatus status) { |
| 12 switch (status) { | 14 switch (status) { |
| 13 case SampleProfileLoadingStatus.fetching: | 15 case SampleProfileLoadingStatus.fetching: |
| 14 case SampleProfileLoadingStatus.loading: | 16 case SampleProfileLoadingStatus.loading: |
| 15 return true; | 17 return true; |
| 16 default: | 18 default: |
| 17 return false; | 19 return false; |
| 18 } | 20 } |
| 19 } | 21 } |
| 20 | 22 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 IsolateRef isolate, ClassRef cls, SampleProfileTag tag); | 37 IsolateRef isolate, ClassRef cls, SampleProfileTag tag); |
| 36 Future enable(IsolateRef isolate, ClassRef cls); | 38 Future enable(IsolateRef isolate, ClassRef cls); |
| 37 Future disable(IsolateRef isolate, ClassRef cls); | 39 Future disable(IsolateRef isolate, ClassRef cls); |
| 38 } | 40 } |
| 39 | 41 |
| 40 abstract class IsolateSampleProfileRepository { | 42 abstract class IsolateSampleProfileRepository { |
| 41 Stream<SampleProfileLoadingProgressEvent> get( | 43 Stream<SampleProfileLoadingProgressEvent> get( |
| 42 IsolateRef isolate, SampleProfileTag tag, | 44 IsolateRef isolate, SampleProfileTag tag, |
| 43 {bool clear: false, bool forceFetch: false}); | 45 {bool clear: false, bool forceFetch: false}); |
| 44 } | 46 } |
| 47 |
| 48 abstract class NativeMemorySampleProfileRepository { |
| 49 Stream<SampleProfileLoadingProgressEvent> get(VM vm, SampleProfileTag tag, |
| 50 {bool clear: false, bool forceFetch: false}); |
| 51 } |
| OLD | NEW |