Index: runtime/vm/metrics.h |
diff --git a/runtime/vm/metrics.h b/runtime/vm/metrics.h |
index 03cead211bbb2cd7a0030a5fad3a2b73a653710e..22f9a7895829d5dccff68506dca7d8e06d75695f 100644 |
--- a/runtime/vm/metrics.h |
+++ b/runtime/vm/metrics.h |
@@ -16,13 +16,15 @@ class JSONStream; |
#define ISOLATE_METRIC_LIST(V) \ |
V(MetricHeapOldUsed, HeapOldUsed, "heap.old.used", kByte) \ |
V(MetricHeapOldCapacity, HeapOldCapacity, "heap.old.capacity", kByte) \ |
+ V(MaxMetric, HeapOldCapacityMax, "heap.old.capacity.max", kByte) \ |
V(MetricHeapOldExternal, HeapOldExternal, "heap.old.external", kByte) \ |
V(MetricHeapNewUsed, HeapNewUsed, "heap.new.used", kByte) \ |
V(MetricHeapNewCapacity, HeapNewCapacity, "heap.new.capacity", kByte) \ |
- V(MetricHeapNewExternal, HeapNewExternal, "heap.new.external", kByte) \ |
+ V(MaxMetric, HeapNewCapacityMax, "heap.new.capacity.max", kByte) \ |
+ V(MetricHeapNewExternal, HeapNewExternal, "heap.new.external", kByte) |
#define VM_METRIC_LIST(V) \ |
- V(MetricIsolateCount, IsolateCount, "vm.isolate.count", kCounter) \ |
+ V(MetricIsolateCount, IsolateCount, "vm.isolate.count", kCounter) |
class Metric { |
public: |
@@ -102,6 +104,26 @@ class Metric { |
}; |
+// A Metric class that reports the maximum value observed. |
+// Initial maximum is kMinInt64. |
+class MaxMetric : public Metric { |
+ public: |
+ MaxMetric(); |
+ |
+ void SetValue(int64_t new_value); |
+}; |
+ |
+ |
+// A Metric class that reports the minimum value observed. |
+// Initial minimum is kMaxInt64. |
+class MinMetric : public Metric { |
+ public: |
+ MinMetric(); |
+ |
+ void SetValue(int64_t new_value); |
+}; |
+ |
+ |
class MetricHeapOldUsed : public Metric { |
protected: |
virtual int64_t Value() const; |