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

Unified Diff: runtime/observatory/lib/src/models/objects/sample_profile.dart

Issue 2204563003: Converted Observatory cpu-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/models/objects/sample_profile.dart
diff --git a/runtime/observatory/lib/src/models/objects/sample_profile.dart b/runtime/observatory/lib/src/models/objects/sample_profile.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5c5a98393c0e14a51bc214f9614b79c97a8fbb4b
--- /dev/null
+++ b/runtime/observatory/lib/src/models/objects/sample_profile.dart
@@ -0,0 +1,64 @@
+// 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 ProfileTreeDirection {
+ inclusive,
+ exclusive
+}
+
+abstract class SampleProfile {
+ int get sampleCount;
+ int get stackDepth;
+ double get sampleRate;
+ double get timeSpan;
+
+ FunctionCallTree loadFunctionTree(ProfileTreeDirection direction);
+ CodeCallTree loadCodeTree(ProfileTreeDirection direction);
+}
+
+abstract class Profile {
+ double get normalizedExclusiveTicks;
+ double get normalizedInclusiveTicks;
+}
+
+abstract class ProfileCode extends Profile {
+ CodeRef get code;
+}
+
+abstract class ProfileFunction extends Profile {
+ FunctionRef get function;
+}
+
+typedef bool CallTreeNodeFilter(CallTreeNode);
+
+abstract class CallTree {
+ CallTree filtered(CallTreeNodeFilter filter);
+}
+
+abstract class CodeCallTree extends CallTree {
+ CodeCallTreeNode get root;
+ CodeCallTree filtered(CallTreeNodeFilter filter);
+}
+
+abstract class FunctionCallTree extends CallTree {
+ FunctionCallTreeNode get root;
+ FunctionCallTree filtered(CallTreeNodeFilter filter);
+}
+
+abstract class CallTreeNode {
+ double get percentage;
+ Iterable<CallTreeNode> get children;
+}
+
+abstract class CodeCallTreeNode extends CallTreeNode {
+ ProfileCode get profileCode;
+ Iterable<CodeCallTreeNode> get children;
+}
+
+abstract class FunctionCallTreeNode extends CallTreeNode {
+ ProfileFunction get profileFunction;
+ Iterable<FunctionCallTreeNode> get children;
+}

Powered by Google App Engine
This is Rietveld 408576698