| 1 | | | import 'perf_counter.dart'; |
| 2 | | | |
| 3 | | | /// A snapshot of a [PerfCounter]'s values. |
| 4 | | | class PerfCounterSnapshot { |
| 5 | | | /// Creates a new snapshop from a the specified [counter]. |
| 6 | | 1 | PerfCounterSnapshot(PerfCounter counter) |
| 7 | | 1 | : name = counter.name, |
| 8 | | 1 | maxTimeInMicroseconds = counter.maxTimeInMicroseconds, |
| 9 | | 1 | totalTimeInMicroseconds = counter.totalTimeInMicroseconds, |
| 10 | | 1 | totalCount = counter.totalCount, |
| 11 | | 1 | totalErrors = counter.totalErrors; |
| 12 | | | |
| 13 | | | /// The counter's name or label. |
| 14 | | | final String name; |
| 15 | | | |
| 16 | | | /// Maximum elapsed time for a single call (in microseconds). |
| 17 | | | final int maxTimeInMicroseconds; |
| 18 | | | |
| 19 | | | /// Total elapsed time (in microseconds). |
| 20 | | | final int totalTimeInMicroseconds; |
| 21 | | | |
| 22 | | | /// Total number of calls. |
| 23 | | | final int totalCount; |
| 24 | | | |
| 25 | | | /// Total number of errors. |
| 26 | | | final int totalErrors; |
| 27 | | | } |