atproto pds in zig pds.zat.dev
pds atproto
Something went wrong. Try again.
Just
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112zig := env_var_or_default('ZIG', 'zig')scale := env_var_or_default('ZDS_BENCH_SCALE', '1000')# run all local store benchmarksall: {{zig}} build bench -Doptimize=ReleaseFast -- --records {{scale}} --blobs 128# run local HTTP route benchmarks against the release serverhttp: ../tools/http_bench.sh# pass arbitrary zds-bench args throughrun *ARGS: {{zig}} build bench -Doptimize=ReleaseFast -- {{ARGS}}# benchmark repo write pathwrite: {{zig}} build bench -Doptimize=ReleaseFast -- --scenario write --records {{scale}}# benchmark indexed read pathsread: {{zig}} build bench -Doptimize=ReleaseFast -- --scenario read --records {{scale}}# benchmark blob disk IO and metadata pathsblob: {{zig}} build bench -Doptimize=ReleaseFast -- --scenario blob --blobs 512 --blob-size 65536# benchmark reclaiming untethered blob metadata and disk filesblob-gc blobs="512" blob_size="65536": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario blob-gc --blobs {{blobs}} --blob-size {{blob_size}}# benchmark full repo CAR materializationrepo: {{zig}} build bench -Doptimize=ReleaseFast -- --scenario repo --records {{scale}}# benchmark Tranquil metastore-shaped store operationsmetastore callers="1" ops_per_caller="100": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario metastore --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark CID-only record lookup, matching Tranquil's get_record_cid benchget-cid callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario get-cid --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark record index lookup plus repo_blocks byte fetchget-block callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario get-block --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark DAG-CBOR decode of a seeded record block without SQLitedecode-record callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario decode-record --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark DAG-CBOR decode plus JSON response rendering without SQLiterender-record callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario render-record --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark full com.atproto.repo.getRecord storage materializationget-record callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario get-record --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark full listRecords storage materializationlist-records callers="10" ops_per_caller="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario list-records --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark listRecords and repo CAR materialization across synthetic repo sizesrepo-size max_records="5000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario repo-size --records {{max_records}}# benchmark sync.getRepo storage pressure: full export, since export, and concurrent full exportsget-repo records="5000" callers="4" ops_per_caller="5": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario get-repo --records {{records}} --callers {{callers}} --ops-per-caller {{ops_per_caller}}# benchmark resident-facing reads while firehose subscribers poll event historyfirehose records="1000" subscribers="32" polls_per_subscriber="100": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario firehose --records {{records}} --callers {{subscribers}} --ops-per-caller {{polls_per_subscriber}}# verify subscribeRepos disconnect churn releases connection-scoped resourceswebsocket-churn rounds="100" concurrency="32": ../tools/websocket_churn.sh {{rounds}} {{concurrency}}# benchmark the production publisher shape: blob IO, repo writes, and sync reads togetherpublish-sync records="100" callers="3" ops_per_caller="3" blob_size="3145728": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario publish-sync --records {{records}} --callers {{callers}} --ops-per-caller {{ops_per_caller}} --blob-size {{blob_size}}# run the upload/write/read mix on disposable Fly machinesfly-upload: ./fly/run.sh# deliberately slow large-repo lane for Paul/Jerry-shaped synthetic repositoriesrepo-large records="100000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario repo-size --records {{records}}# benchmark experimental permissioned-space storage pathsspace records="1000": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario space --records {{records}}# run the official Bluesky PDS read probe from a local atproto checkoutofficial-pds: ./run-official-pds.sh# profile applyWrites stage timing under write concurrencywrite-profile callers="10" ops_per_caller="500": {{zig}} build bench -Doptimize=ReleaseFast -- --scenario write-profile --callers {{callers}} --ops-per-caller {{ops_per_caller}}# measure fresh schema creation and restarts through HTTP readiness (production build mode)startup runs="5" history="10000": {{zig}} build -Doptimize=ReleaseSafe cd .. && python3 tools/startup_bench.py --runs {{runs}} --history {{history}}# benchmark OAuth space-level reads and collection-restricted writesspace-scopes: {{zig}} run -O ReleaseFast --dep scopes -Mroot=../bench/space_scopes.zig -Mscopes=../src/internal/scopes.zig