MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / compute_apdex

Function compute_apdex

tests/loadtest/tools/dashboard_parser.py:436–441  ·  view source on GitHub ↗
(values: list[float], threshold: float = 300.0)

Source from the content-addressed store, hash-verified

434
435
436def compute_apdex(values: list[float], threshold: float = 300.0) -> float | None:
437 if not values:
438 return None
439 satisfied = sum(1 for value in values if value <= threshold)
440 tolerated = sum(1 for value in values if threshold < value <= threshold * 4)
441 return (satisfied + 0.5 * tolerated) / len(values)
442
443
444def last_defined(series: list[dict[str, Any]], key: str) -> float | None:

Callers 1

parse_ndjsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected