fairness_eval

command
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Fairness regression gate

From the repository root:

go test ./cmd/fairness_eval -run '^TestFairnessGate$' -count=1 -timeout=30s -v

A failing seed fails the command. This tests the default FAIR variant, not the evaluator's configuration sweep. Each workload runs for 120 simulated seconds at 40 tokens/second, starting with 40 tokens. The tracker rotates at 25, 50, 75, and 100 seconds; the simulation waits for each rotation before processing the next request. Seeds 17, 53, and 101 each drive Poisson arrivals, placement keys, and tracker decisions. Each trace is regenerated and replayed from scratch; per-client counts and the entire result must match exactly. Each run owns its seeded key and decision sources, so the result does not depend on any process-wide generator.

Workload Worst client entitlement ratio Entitlement Jain index Utilization
20 equal clients, 4 requests/second each ≥ 0.70 ≥ 0.98 ≥ 0.98
16 steady clients at 2 requests/second plus 4 noisy clients at 20 ≥ 0.50 ≥ 0.75 ≥ 0.98

Each floor applies to every seed, not the mean. Entitlement is the evaluator's max-min allocation of available capacity capped by realized client demand. The worst ratio protects a single underserved client that Jain's index could hide; Jain checks balance across all clients. Equal senders should approach parity, with allowance for arrival and throttle randomness. Tenfold rate skew is harder: the gate still requires every client to receive half its entitlement and limits overall imbalance. Across the three calibration seeds the minimum (worst ratio, Jain) was (0.711, 0.989) for equal clients and (0.639, 0.793) for noisy neighbors. Both workloads offer more than enough traffic to saturate the resource, so no more than 2% of capacity should be wasted. These are regression budgets for fixed workloads, not production guarantees.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL