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

Side by Side Diff: runtime/observatory/lib/src/models/repositories/sample_profile.dart

Issue 2204563003: Converted Observatory cpu-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added lifecycle tests Created 4 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
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698