Exercise uncached session lookup for reproducible rare slow traces
This commit is contained in:
@@ -127,7 +127,7 @@ def run_profile(client, profile, repeat):
|
||||
time.sleep(delay)
|
||||
if index == 160:
|
||||
lock_future = executor.submit(compose,'exec','-T','postgres','psql','-U','messenger','-d','messenger','-c',
|
||||
'BEGIN; LOCK TABLE users IN ACCESS EXCLUSIVE MODE; SELECT pg_sleep(0.35); COMMIT;')
|
||||
'BEGIN; LOCK TABLE sessions IN ACCESS EXCLUSIVE MODE; SELECT pg_sleep(0.35); COMMIT;')
|
||||
ready = [future for future in pending if future.done()]
|
||||
for future in ready:
|
||||
calls.append(future.result())
|
||||
@@ -146,6 +146,7 @@ def run_profile(client, profile, repeat):
|
||||
time.sleep(10)
|
||||
after = telemetry_snapshot(instance_ids)
|
||||
memory_after = cgroups(['api','worker','collector','tempo'])
|
||||
assert any(row['kind']=='read' and row['duration_s']>=.15 for row in calls), 'Slow read probe did not occur'
|
||||
rare = [row for row in calls if row['status']==500 or (row['kind']=='read' and row['duration_s']>=.15)]
|
||||
for row in rare:
|
||||
row['found_in_tempo'] = exists(row['trace_id'])
|
||||
@@ -169,7 +170,7 @@ def main():
|
||||
report = {'started_at':datetime.now(UTC).isoformat(),'track':'observability cost','runs':[],
|
||||
'method':{'profiles':PROFILES,'repeats':3,'offered_rps':OFFERED,'measurement_s':DURATION,
|
||||
'latency_clock':'client perf_counter, includes network and queueing',
|
||||
'rare_slow':'one 350ms exclusive users-table lock/run',
|
||||
'rare_slow':'one 350ms exclusive sessions-table lock/run',
|
||||
'rare_errors':'two actual API500 after durable upload COMMIT/run through private local fault hooks',
|
||||
'wire_bytes':'protobuf body length on each SDK HTTP send, retries included; excludes HTTP/TLS headers',
|
||||
'sdk_queue_losses':'conservation after 10s quiescence, separate from sampled-out spans',
|
||||
|
||||
Reference in New Issue
Block a user