runFate
@forge/monorepo / backend/src / runFate
Function: runFate()
runFate(
runId):object
Defined in: backend/src/loadtest/scenario.ts:106
Two stable, well-distributed fractions from a run id.
Stable because a resumed run must draw the same fate as its first attempt — Math.random() and a shared
generator both fail at that, and a scenario that changes under a resume can make no claim about resumption.
Well-distributed because the first version was not, and it mattered. Plain FNV-1a with two different offset
bases, taken as a raw fraction, gave 0.03 external-action rate for one id prefix and 0.50 for another against a
configured 0.30 — the low bits are poorly mixed and two bases correlate. So: FNV-1a over a salted string,
then murmur3's fmix32 avalanche. A biased traffic mix is a load test that measures a different workload than
the one it reports, and nothing in the output would have said so.
Parameters
runId
string
Returns
object
a
readonlya:number
b
readonlyb:number