tursodatabase/turso · error · ValueError
throughput results must meet a positive minimum duration
Error message
throughput results must meet a positive minimum duration
What it means
Throughput rows must run for at least min_seconds; if the measured seconds is below the declared positive minimum, the queries/second figure is considered too noisy or invalid and the row is rejected.
Solutions
- Re-run the throughput benchmark long enough to exceed min_seconds
- Lower min_seconds in the row to match the actual run duration, if justified
- Remove the too-short throughput rows from the CSV
Example fix
// before (CSV) benchmark=throughput,seconds=2,min_seconds=10 // after benchmark=throughput,seconds=12,min_seconds=10
Defensive patterns
Strategy: validation
Validate before calling
def validate_throughput_row(row):
if float(row["seconds"]) < float(row["min_seconds"]):
raise ValueError("throughput results must meet a positive minimum duration") Type guard
def is_long_enough(row) -> bool:
return float(row["seconds"]) >= float(row["min_seconds"]) > 0 Try / catch
try:
configuration, runs = read_runs(path, percentile)
except ValueError as e:
print(f"run too short: {e}") Prevention
- Run throughput benchmarks well past min_seconds
- Set min_seconds before the run and never below actual duration
- Watch for aborted runs that stop early
When it happens
Trigger: A throughput row where the seconds column is smaller than the row's min_seconds value (e.g. a run aborted almost immediately).
Common situations: Benchmark killed early; min_seconds raised after a short test run; clock/walltime recorded incorrectly by the harness.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- heap results require Turso and the requested queries per…
- profiled timings must not be used for benchmark comparisons
- search results require at least one sample per connection…
- batch mode must be one of
- batch mode must be one of
AI-assisted analysis of tursodatabase/turso@8d4a589f8d (2026-09-20).
Data as JSON: /api/errors/2709c00de7b1e868.
Report an issue: GitHub.
Appendix: source
Thrown at perf/fts/plot/plot-fts.py:137
def read_measurement(row, percentile):
queries = int(row["queries"])
positive_number(queries)
if row["benchmark"] != "memory":
seconds = positive_number(row["seconds"])
if row["benchmark"] == "memory":
if row["engine"] != "turso" or queries != int(row["requested_queries"]) * int(row["connections"]):
raise ValueError("heap results require Turso and the requested queries per connection")
value = float(row["peak_heap_bytes"]) / (1024 * 1024)
elif row["benchmark"] == "search":
if not 0 < int(row["connections"]) <= queries or queries != int(row["requested_queries"]):
raise ValueError("search results require at least one sample per connection and the requested query count")
value = float(row[f"{percentile}_ms"])
elif row["benchmark"] == "throughput":
minimum = positive_number(row["min_seconds"])
if seconds < minimum:
raise ValueError("throughput results must meet a positive minimum duration")
value = queries / seconds
else:
raise ValueError("unknown benchmark")
return positive_number(value)
def positive_number(value):
value = float(value)
if not np.isfinite(value) or value <= 0:
raise ValueError("measurements must be finite and positive")
return value
def plot_sweep(configuration, points, output, relative=False):
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as pltView on GitHub (pinned to 8d4a589f8d)