Skip to content

fix: run the monitor load test through the real traces client - #4364

Closed
kcoopermiller wants to merge 1 commit into
mainfrom
fix/monitor-load-real-traces-client
Closed

kcoopermiller wants to merge 1 commit into
mainfrom
fix/monitor-load-real-traces-client

Conversation

@kcoopermiller

Copy link
Copy Markdown
Member

Summary

Why prime-1000 still fails

Level 1 fixes delivery in this test, but log() still blocks for about 3 s, over the test's 250 ms limit. The uploader takes everything queued into one long write while log() fills the queue again. The queue, the 5 s blocking put and the drops are unchanged in the SDK.

Verification

prime-1000 with the assertion enforced (--runxfail), on a Mac:

Gzip level Delivered Wall time Failing assertion
9 993 / 1000 (7 dropped) 67 s delivery
1 (three runs) 1000 / 1000 15 s log() took 2954–2964 ms

Whole file at level 1: 8 passed, 1 xfailed, in 37 s. ruff check, ruff format --check and uv lock --check pass. The environment skipped litellm and harbor, which don't build on macOS.

The fake endpoint costs no time, so these runs can't show drops caused by a slow service. I also ran the real UploadWorker, TracesSink and TracesClient against a real dev Prime Traces deployment, from a laptop on about 320 Mbit/s of uplink: 1000 episodes of about 2.6 MiB, submitted as fast as possible.

Gzip level Stored Dropped Total time Throughput Longest submit()
9 976 24 236 s 4.1 episodes/s 5.0 s
1 982 18 177 s 5.6 episodes/s 5.0 s

So #1129 speeds up uploads by about a third on a real service, but it doesn't stop the drops. The stored counts were read back from the service.

🤖 Generated with Claude Code

The load test's fake replaced TracesAPIClient and gzipped at level 9 itself, so
it could not see the client's gzip level or the rest of its upload path. Serve
the fake endpoint behind the real client through an httpx mock transport.

Pin prime-traces to the commit with PrimeIntellect-ai/prime#1129 (gzip level 1).
prime-runs stays where it is: deps/verifiers pins the same commit, and the gzip
change is in prime-traces alone.

prime-1000 stays an expected failure. Every episode now arrives, but log() still
blocks for about 3 s while the upload queue is full. The TODO described an
uploader that sends one episode at a time; it takes everything queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kcoopermiller

Copy link
Copy Markdown
Member Author

Closing in favor of #4363, which moves the SDK to its PyPI releases and makes this load test respond to the gzip level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant