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

Unified Diff: runtime/vm/json_stream.h

Issue 464953002: Add VMMetric and some sample metrics (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 3fc4961e61ae470802d037ae956f9ea35a992906..cd533db36b097034ed1739731cd765212db74f4d 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -20,6 +20,7 @@ class JSONArray;
class JSONObject;
class Object;
class SourceBreakpoint;
+class VMMetric;
class Zone;
class JSONStream : ValueObject {
@@ -88,6 +89,7 @@ class JSONStream : ValueObject {
void PrintValue(const Object& o, bool ref = true);
void PrintValue(SourceBreakpoint* bpt);
void PrintValue(const DebuggerEvent* event);
+ void PrintValue(VMMetric* metric);
void PrintValue(Isolate* isolate, bool ref = true);
void PrintPropertyBool(const char* name, bool b);
@@ -102,6 +104,7 @@ class JSONStream : ValueObject {
void PrintProperty(const char* name, const DebuggerEvent* event);
void PrintProperty(const char* name, SourceBreakpoint* bpt);
+ void PrintProperty(const char* name, VMMetric* metric);
void PrintProperty(const char* name, Isolate* isolate);
void PrintPropertyName(const char* name);
void PrintCommaIfNeeded();
@@ -168,6 +171,9 @@ class JSONObject : public ValueObject {
void AddProperty(const char* name, SourceBreakpoint* bpt) const {
stream_->PrintProperty(name, bpt);
}
+ void AddProperty(const char* name, VMMetric* metric) const {
+ stream_->PrintProperty(name, metric);
+ }
void AddProperty(const char* name, Isolate* isolate) const {
stream_->PrintProperty(name, isolate);
}
@@ -216,6 +222,9 @@ class JSONArray : public ValueObject {
void AddValue(const DebuggerEvent* event) const {
stream_->PrintValue(event);
}
+ void AddValue(VMMetric* metric) const {
+ stream_->PrintValue(metric);
+ }
void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3);
private:
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/json_stream.cc » ('j') | runtime/vm/json_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698