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

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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 3fc4961e61ae470802d037ae956f9ea35a992906..057fbf973fa5d917e3fc2b5c42c8ea01c7828dc1 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 Metric;
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(Metric* 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, Metric* 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, Metric* 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(Metric* 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698