diff options
| author | eunhhu <[email protected]> | 2026-09-30 07:22:34 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 07:22:34 +0100 |
| commit | 49c5b0cb8205509ed602d5e6a71ec4edd7b0387f (patch) | |
| tree | d270c14c8a603a5c3c719a354b3c02c176020a12 /benchmarks | |
| parent | 155b73513017c79dcf235b53f0b4942e80dc2e29 (diff) | |
| download | pure-49c5b0cb8205509ed602d5e6a71ec4edd7b0387f.tar.gz pure-49c5b0cb8205509ed602d5e6a71ec4edd7b0387f.zip | |
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.
Diffstat (limited to 'benchmarks')
| -rw-r--r-- | benchmarks/tpcc/run.py | 14 |
1 files changed, 10 insertions, 4 deletions
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): |
