Skip to content

Measuring tool for code versions performance - #63

Merged
galekseev merged 9 commits into
masterfrom
cursor/bench-compare-image-8efa
Aug 3, 2026
Merged

Measuring tool for code versions performance#63
galekseev merged 9 commits into
masterfrom
cursor/bench-compare-image-8efa

Conversation

@galekseev

Copy link
Copy Markdown

Adds bench/, a measuring tool kept separate from the shipping image added in #62: it builds two arbitrary revisions of profanity2 into one image and runs them alternately on the same GPU.

bench/publish.sh 9011bcd pr/57 --registry ghcr.io/YOUR_USER
vastai create instance <OFFER_ID> --image ghcr.io/YOUR_USER/profanity2-bench:9011bcd__pr-57 \
    --disk 12 --args --mode leading

cursoragent and others added 9 commits August 2, 2026 17:46
Builds both revisions from a fresh clone into one image and runs them
alternately on the same GPU, which is the only way an 8-12% difference can
be told apart from the spread between two rented machines.

Kept separate from the shipping image in the repository root: it has its own
directory, its own build context and its own entrypoint.

Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
The warning fired when both revisions measured identically with no spread,
calling a quiet machine noisy. It now only fires when the repeats actually
disagree, and says what that means for the comparison.

Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
The benchmark picked up whatever PUBLIC_KEY held in the environment, so on a
platform that sets that name for its own SSH key every run died with "public
key must be 128 hexademical characters long" and the container was restarted
in a loop.

BENCH_PUBLIC_KEY is now the name to use, a plain PUBLIC_KEY is only honoured
when it holds 128 hexadecimal characters, and the header always reports which
key the run used.

Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
ttl.sh was the only documented target, which forced a random image name and
a lifetime of at most a day on anyone running more than one comparison. The
name is now chosen to suit the registry: the local tag is reused everywhere
except ttl.sh, where the tag has to carry the lifetime.

Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
Co-authored-by: Gleb Alekseev <alekseev.gleb@gmail.com>
@galekseev
galekseev merged commit 4c958d2 into master Aug 3, 2026
1 check passed
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.

2 participants