From 49c5b0cb8205509ed602d5e6a71ec4edd7b0387f Mon Sep 17 00:00:00 2001 From: eunhhu Date: Wed, 30 Sep 2026 07:22:34 +0100 Subject: Read TPC-C's table dumps from Pure a page at a time With four warehouses the order lines answered at once (about 140 MB of JSON) outgrew pure-serve's 64 MiB budget, and the check stopped with 503; a larger budget would have left the answer's memory in the resident size measured after. --- benchmarks/tpcc/run.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'benchmarks/tpcc') diff --git a/benchmarks/tpcc/run.py b/benchmarks/tpcc/run.py index 4a388bc..377d555 100644 --- a/benchmarks/tpcc/run.py +++ b/benchmarks/tpcc/run.py @@ -242,10 +242,16 @@ def register(pure, aup, work, name, view): assert status == 200, (name, status, body[:200]) -def asked(pure, name): - status, body = pure.call('GET', f'/queries/{name}') - assert status == 200, (name, status, body[:200]) - return [tuple(row.values()) for row in json.loads(body)['items']] +def asked(pure, name, page=200000): + """A query's rows, a page at a time: a whole table of W > 1 answered at once outgrows the server's budget.""" + rows = [] + while True: + status, body = pure.call('GET', f'/queries/{name}?from={len(rows)}&count={page}') + assert status == 200, (name, status, body[:200]) + answer = json.loads(body) + rows += [tuple(row.values()) for row in answer['items']] + if len(rows) >= answer['rows'] or not answer['items']: + return rows def same(a, b): -- cgit v1.2.3