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

Unified Diff: runtime/vm/metrics.cc

Issue 886353006: Port metrics to RPC (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/observatory/test/weak_properties_test.dart ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/metrics.cc
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index 76870051c404108995fd59eaf7fd462c81f0ab58..2e768b5db884f83218aae0b0dd9b1ab9a1db9bdc 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -81,7 +81,11 @@ void Metric::PrintJSON(JSONStream* stream) {
obj.AddProperty("name", name_);
obj.AddProperty("description", description_);
obj.AddProperty("unit", UnitString(unit()));
- obj.AddPropertyF("id", "metrics/vm/%s", name_);
+ if (isolate_ == NULL) {
+ obj.AddPropertyF("id", "vm/metrics/%s", name_);
+ } else {
+ obj.AddPropertyF("id", "metrics/native/%s", name_);
+ }
// TODO(johnmccutchan): Overflow?
double value_as_double = static_cast<double>(Value());
obj.AddProperty("value", value_as_double);
« no previous file with comments | « runtime/observatory/test/weak_properties_test.dart ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698