| Index: runtime/observatory/lib/src/models/repositories/sample_profile.dart
|
| diff --git a/runtime/observatory/lib/src/models/repositories/sample_profile.dart b/runtime/observatory/lib/src/models/repositories/sample_profile.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ec7cfd6f79644d52e554578f8f1a76e67de9ee7
|
| --- /dev/null
|
| +++ b/runtime/observatory/lib/src/models/repositories/sample_profile.dart
|
| @@ -0,0 +1,52 @@
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file
|
| +
|
| +part of models;
|
| +
|
| +enum SampleProfileTag {
|
| + userVM,
|
| + userOnly,
|
| + vmUser,
|
| + vmOnly,
|
| + none
|
| +}
|
| +
|
| +enum SampleProfileLoadingStatus {
|
| + disabled,
|
| + fetching,
|
| + loading,
|
| + loaded
|
| +}
|
| +
|
| +bool isSampleProcessRunning(SampleProfileLoadingStatus status) {
|
| + switch (status) {
|
| + case SampleProfileLoadingStatus.fetching:
|
| + case SampleProfileLoadingStatus.loading:
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| +}
|
| +
|
| +abstract class SampleProfileLoadingProgressEvent {
|
| + SampleProfileLoadingProgress get progress;
|
| +}
|
| +
|
| +abstract class SampleProfileLoadingProgress {
|
| + SampleProfileLoadingStatus get status;
|
| + double get progress;
|
| + Duration get fetchingTime;
|
| + Duration get loadingTime;
|
| + SampleProfile get profile;
|
| +}
|
| +
|
| +abstract class ClassSampleProfileRepository {
|
| + Stream<SampleProfileLoadingProgressEvent> get(ClassRef cls,
|
| + SampleProfileTag tag, {bool clear: false});
|
| +}
|
| +
|
| +abstract class IsolateSampleProfileRepository {
|
| + Stream<SampleProfileLoadingProgressEvent> get(IsolateRef cls,
|
| + SampleProfileTag tag, {bool clear: false, bool forceFetch: false});
|
| +}
|
|
|