{"record":{"id":"57cfb95edcceefd0","repo":"tursodatabase/turso","slug":"no-query-finished-on-any-engine","errorCode":null,"errorMessage":"no query finished on any engine","messagePattern":"no query finished on any engine","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"perf/tpc-h/plot/plot-tpch.py","lineNumber":142,"sourceCode":"                for x, (t, lo, hi) in enumerate(zip(self.times, self.lows, self.highs)) if t is not None]\n\n\ndef parse_time(text):\n    text = text.strip()\n    if not text or text.upper() == \"NA\":\n        return None\n    return float(text)\n\n\nclass Figure:\n    def __init__(self, runs, columns, names):\n        self.queries = [row[\"Query\"] for row in runs[0].rows]\n        self.series = [Series(c, i, self.queries, runs, names.get(c.lower())) for i, c in enumerate(columns)]\n        self.whiskers = len(runs) > 1\n        lows = [t for s in self.series for t in s.lows if t is not None]\n        highs = [t for s in self.series for t in s.highs if t is not None]\n        if not lows:\n            raise SystemExit(\"no query finished on any engine\")\n        # A decade of headroom under the fastest run and over the slowest,\n        # so the shortest bar still has height and the legend fits over the tallest.\n        self.ymin = 10 ** np.floor(np.log10(min(lows)))\n        self.ymax = 10 ** (np.ceil(np.log10(max(highs))) + 0.5)\n        self.bar_width = GROUP_WIDTH / len(self.series)\n\n    def offset(self, index):\n        \"\"\"How far the bars of the engine at `index` sit from the query's centre.\"\"\"\n        return (index - (len(self.series) - 1) / 2) * self.bar_width\n\n    def matplotlib(self, output):\n        import matplotlib\n\n        matplotlib.use(\"Agg\")\n        import matplotlib.pyplot as plt\n        import scienceplots  # noqa: F401  (registers the styles)\n        from matplotlib.ticker import FuncFormatter, NullLocator\n","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/tursodatabase/turso/blob/492c4a71cd7c2649e7df83da1471b74f4b1c7aa9/perf/tpc-h/plot/plot-tpch.py#L124-L160","documentation":"The Figure constructor computes the y-axis range from the minimum 'low' timing across all series. Every series low is None when no query finished on any engine (all runs missing/timing data), so axis scaling would divide by nothing; the script exits with this message.","triggerScenarios":"Building the Figure from runs whose rows have no valid timing values in the low/high columns — e.g. every query errored, timed out, or the timing columns are absent/None in all CSVs.","commonSituations":"Benchmark run where all engines failed on all TPC-H queries; plotting CSVs that contain rows but only error markers or empty timing cells; comparing against an engine that produced no completed measurements.","solutions":["Check the CSV timing columns contain numeric values: `head results.csv`; re-run the benchmark if all timings are missing.","Fix engine crashes/errors that prevented any query from completing before plotting.","Verify the column names expected by Series (e.g. 'Query', timing columns) match the CSV header.","Plot a run where at least one query completed on one engine."],"exampleFix":"// before\npython plot-tpch.py --csv-files all_failed.csv -o out\n// after\npython plot-tpch.py --csv-files successful_run.csv -o out","handlingStrategy":"validation","validationCode":"import csv\ndef has_any_timing(paths):\n    for p in paths:\n        with open(p, newline=\"\") as f:\n            for row in csv.DictReader(f):\n                if row.get(\"low\") not in (None, \"\"):\n                    return True\n    return False","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify at least one query succeeded per engine before charting","Check for engine crashes/errors in benchmark logs when timings are all empty","Sanity-check numeric timing columns parse as floats"],"tags":["python","plotting","benchmark","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"492c4a71cd7c2649e7df83da1471b74f4b1c7aa9","analyzedAt":"2026-09-13T18:13:59.796Z","contentChangedAt":"2026-09-13T18:13:59.796Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}