diff --git a/workers/null/client.py b/workers/null/client.py index ac5c46a..29ac192 100644 --- a/workers/null/client.py +++ b/workers/null/client.py @@ -36,7 +36,7 @@ async def reserve( start = time.monotonic() log.info("[%s] POST /reserve duration=%ss", label, duration) try: - resp = await endpoint.request("/reserve", payload, cost=1) + resp = await endpoint.request("/reserve", payload, cost=100) elapsed = time.monotonic() - start log.info("[%s] returned after %.1fs: %s", label, elapsed, resp.get("response")) return resp["response"] diff --git a/workers/null/worker.py b/workers/null/worker.py index 21c2c27..b0943f2 100644 --- a/workers/null/worker.py +++ b/workers/null/worker.py @@ -117,11 +117,11 @@ async def reserve_worker(**params: object) -> dict: if params.get(BENCHMARK_SENTINEL): # The framework computes max_throughput = workload / time during the - # startup benchmark. A null worker has no throughput concept (a - # reservation is a unitless slot), so we deliberately take ~1s with - # workload=1 to pin max_throughput to ~1.0. Without this the - # near-instant benchmark would report hundreds of thousands of - # workload/sec, distorting any downstream capacity math. + # startup benchmark. A null worker has no real throughput concept, + # so we deliberately take ~1s with workload=100 to pin + # max_throughput to ~100. Without this the near-instant benchmark + # would report hundreds of thousands of workload/sec, distorting + # any downstream capacity math. await asyncio.sleep(1.0) return {"ok": True, "benchmark": True} @@ -173,7 +173,7 @@ worker_config = WorkerConfig( # it to a free worker (or spins up a new one). max_queue_time=0.0, remote_function=reserve_worker, - workload_calculator=lambda _payload: 1.0, + workload_calculator=lambda _payload: 100.0, benchmark_config=BenchmarkConfig( generator=lambda: {BENCHMARK_SENTINEL: True}, runs=1,