MCPcopy
hub / github.com/benoitc/gunicorn / BenchmarkResult

Class BenchmarkResult

benchmarks/dirty_benchmark.py:98–114  ·  view source on GitHub ↗

Results from a single benchmark run.

Source from the content-addressed store, hash-verified

96
97@dataclass
98class BenchmarkResult:
99 """Results from a single benchmark run."""
100 scenario: str
101 config: dict
102 total_requests: int = 0
103 successful: int = 0
104 failed: int = 0
105 errors: list[str] = field(default_factory=list)
106 duration_sec: float = 0.0
107 requests_per_sec: float = 0.0
108 latency_ms: LatencyStats = field(default_factory=LatencyStats)
109
110 def to_dict(self) -> dict:
111 """Convert to dictionary for JSON serialization."""
112 d = asdict(self)
113 d['latency_ms'] = asdict(self.latency_ms)
114 return d
115
116
117class MockConfig:

Callers 5

run_isolated_suiteFunction · 0.70
run_payload_suiteFunction · 0.70
run_quick_testFunction · 0.70
run_config_sweepFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected