Index: runtime/vm/metrics.cc |
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc |
index 79038fb1f266f2588919773c14920df0d8401fc1..274a3fd179f5025f1a90f1adf032497eae0ee788 100644 |
--- a/runtime/vm/metrics.cc |
+++ b/runtime/vm/metrics.cc |
@@ -307,4 +307,30 @@ void Metric::Cleanup() { |
} |
} |
+ |
+MaxMetric::MaxMetric() |
+ : Metric() { |
+ set_value(kMinInt64); |
+} |
+ |
+ |
+void MaxMetric::SetValue(int64_t new_value) { |
+ if (new_value > value()) { |
+ set_value(new_value); |
+ } |
+} |
+ |
+ |
+MinMetric::MinMetric() |
+ : Metric() { |
+ set_value(kMaxInt64); |
+} |
+ |
+ |
+void MinMetric::SetValue(int64_t new_value) { |
+ if (new_value < value()) { |
+ set_value(new_value); |
+ } |
+} |
+ |
} // namespace dart |