| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/metrics.h" | 5 #include "vm/metrics.h" |
| 6 | 6 |
| 7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 OS::Print("Printing metrics for VM\n"); | 300 OS::Print("Printing metrics for VM\n"); |
| 301 Metric* current = Metric::vm_head(); | 301 Metric* current = Metric::vm_head(); |
| 302 while (current != NULL) { | 302 while (current != NULL) { |
| 303 OS::Print("%s\n", current->ToString()); | 303 OS::Print("%s\n", current->ToString()); |
| 304 current = current->next(); | 304 current = current->next(); |
| 305 } | 305 } |
| 306 OS::Print("\n"); | 306 OS::Print("\n"); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 |
| 311 MaxMetric::MaxMetric() |
| 312 : Metric() { |
| 313 set_value(kMinInt64); |
| 314 } |
| 315 |
| 316 |
| 317 void MaxMetric::SetValue(int64_t new_value) { |
| 318 if (new_value > value()) { |
| 319 set_value(new_value); |
| 320 } |
| 321 } |
| 322 |
| 323 |
| 324 MinMetric::MinMetric() |
| 325 : Metric() { |
| 326 set_value(kMaxInt64); |
| 327 } |
| 328 |
| 329 |
| 330 void MinMetric::SetValue(int64_t new_value) { |
| 331 if (new_value < value()) { |
| 332 set_value(new_value); |
| 333 } |
| 334 } |
| 335 |
| 310 } // namespace dart | 336 } // namespace dart |
| OLD | NEW |