Build one metric, resolving whatever target the production declared for it.
A target stated in the wrong unit does not silently pass and does not
silently fail: it is dropped and reported as a target-unit-mismatch
warning, so the metric reads untargeted (which is true, nothing comparable
was declared) while the author is told exactly which declaration is wrong.
Comparing 300 lux against a target of 300 candela would be the alternative,
and it would clear a room nobody measured correctly.
A metric with no value must say why. Passing a value and a gap together, or
neither, throws: those are the two shapes that let an absent measurement
masquerade as a result. A non-finite value also throws. A metric with no
value never carries a target, whatever was declared for its key.
Units are compared as exact strings with no conversion, so lx and lux are
different units. The first target with the metric's key decides; duplicate
keys are refused earlier by assertAutoMovieAnalysisTargets.
Build one metric, resolving whatever target the production declared for it.
A target stated in the wrong unit does not silently pass and does not silently fail: it is dropped and reported as a
target-unit-mismatchwarning, so the metric readsuntargeted(which is true, nothing comparable was declared) while the author is told exactly which declaration is wrong. Comparing 300 lux against a target of 300 candela would be the alternative, and it would clear a room nobody measured correctly.A metric with no value must say why. Passing a value and a gap together, or neither, throws: those are the two shapes that let an absent measurement masquerade as a result. A non-finite value also throws. A metric with no value never carries a target, whatever was declared for its key.
Units are compared as exact strings with no conversion, so
lxandluxare different units. The first target with the metric's key decides; duplicate keys are refused earlier byassertAutoMovieAnalysisTargets.