defs library
Classes
- MetricDef
- Display definition of one published metric.
Constants
-
kDeviceMetricDefs
→ const List<
MetricDef> - Contract device metrics (profile build, emulator): the published S1–S6 rows. Lower is better for all of them.
-
kPublishableMetricDefs
→ const List<
MetricDef> - The metrics a published table/card can show: everything that records a number (kDeviceMetricDefs + kSizeMetricDefs).
-
kSizeMetricDefs
→ const List<
MetricDef> -
Host-size metrics (release builds, no device) — S7, a scenario of
contract runlike the rest.bundle_deltais SDK-pinned under refany;native_sizeunderany+android.
Functions
-
formatCardValue(
num? value, String unit) → String - Display value for a card tile: bytes as KB/MB, ms as ms (or s above 1000), else as-is.
-
formatTableValue(
num? value, String unit) → String - Compact display value+unit for a table cell: 41632 B -> '41 KB', 72 ms -> '72 ms', 4 -> '4'.
-
metricDefOf(
String key) → MetricDef? -
Def for
keyamong kPublishableMetricDefs, or null.