Recipes

Budget a task before you scale it

Note
This page is generated from a mock CLI, and its numbers are placeholders.

Verified against vakna 0.0.0-mock on

Run a small fork first and read its cost with vakna receipt <task> --money cost. A fork's cost grows with its count, so fifty boxes tell you what a thousand will cost.

How much did a small run cost?

sh
vakna fork api --count 50 -- go test -run TestRetry ./retry/...vakna receipt prove-flaky-retry --money cost
prints snapshot snp_eu1a_z7a8b9c0 taken 0.19s forked api ×50 from snapshot · 0.34s each task prove-flaky-retry tsk_eu1a_0k1m2n3p ran go test -run TestRetry ./retry/... in 50 boxes · 42 exit 0, 8 failed 2m 11s errors: 2 signatures assertion in retry_test.go:88 ×6 timeout after 30s ×2 receipt: prove-flaky-retry · 50 boxes · 8 failed · 2m 11s · $0.46 · mocked receipt · task prove-flaky-retry tsk_eu1a_0k1m2n3p mocked ──────────────────────────────────────────────────────────────────────────────── boxes 50 took 2m 11s started forked ×50 from snapshot 0.34s each passed 42 of 50 errors 2 signatures assertion in retry_test.go:88 ×6 timeout after 30s ×2 wall clock 1h 18m cost $0.46

How do I scale it once the cost is right?

sh
vakna fork api --count 1000 --name prove-hypothesis-42 -- pytest -k slow
prints snapshot snp_eu1a_z7a8b9c0 taken 0.19s forked api ×1,000 from snapshot · 0.34s each task prove-hypothesis-42 tsk_eu1a_4x5y6z7a ran pytest -k slow in 1,000 boxes · 994 exit 0, 6 failed 3m 20s errors: 3 signatures OOM in test runner ×3 port 5432 already in use ×2 timeout after 45s ×1 receipt: prove-hypothesis-42 · 1,000 boxes · 6 failed · 3m 20s · $4.12 · mocked

There is no spending cap flag yet. One task holds up to 1,000 boxes, and a larger --count is an error that says so.

View as Markdown