Zero-everything summary, used when the histogram is unavailable. Old reports written before option-count tracking existed migrate to this shape rather than ``null`` so analysis tools can rely on the field always being a populated struct.
(cls)
| 70 | |
| 71 | @classmethod |
| 72 | def empty(cls) -> OptionCountSummary: |
| 73 | """Zero-everything summary, used when the histogram is unavailable. |
| 74 | |
| 75 | Old reports written before option-count tracking existed migrate |
| 76 | to this shape rather than ``null`` so analysis tools can rely on |
| 77 | the field always being a populated struct. |
| 78 | """ |
| 79 | return cls( |
| 80 | n=0, |
| 81 | total=0, |
| 82 | mean=0.0, |
| 83 | median=0.0, |
| 84 | p90=0.0, |
| 85 | max=0, |
| 86 | buckets={"0": 0, "1-5": 0, "6-15": 0, "16-50": 0, "50+": 0}, |
| 87 | ) |
| 88 | |
| 89 | @classmethod |
| 90 | def from_counts(cls, counts: list[int]) -> OptionCountSummary: |
no outgoing calls
no test coverage detected