| 37 | |
| 38 | @dataclass(frozen=True) |
| 39 | class BenchmarkCase: |
| 40 | mode: ReadMode |
| 41 | body_size: int |
| 42 | chunk_size: int |
| 43 | |
| 44 | @property |
| 45 | def id(self) -> str: |
| 46 | body_size = format_size(self.body_size) |
| 47 | chunk_size = "single" if self.chunk_size == self.body_size else format_size(self.chunk_size) |
| 48 | return f"{self.mode}-{body_size}-{chunk_size}" |
| 49 | |
| 50 | |
| 51 | READ_MODES: tuple[ReadMode, ...] = ("body", "stream") |