Chromium Code Reviews| 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); |
|
koda
2015/10/05 20:35:23
SetValue is somewhat misleading, but not sure what
Cutch
2015/10/05 20:54:35
Agreed. I had 'SampleValue' at one point but decid
|
| +}; |
| + |
| + |
| +// 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); |
|
koda
2015/10/05 20:35:23
Ditto.
Cutch
2015/10/05 20:54:35
Acknowledged.
|
| +}; |
| + |
| + |
| class MetricHeapOldUsed : public Metric { |
| protected: |
| virtual int64_t Value() const; |