Add metrics for tracking cache hit ratios

This commit is contained in:
2025-06-13 01:16:24 -04:00
parent 8fe81e3ab3
commit 7c395a80fe
3 changed files with 106 additions and 2 deletions

View File

@@ -656,7 +656,11 @@ def test_queries():
# If the metric has arguments to use while testing, grab those
args = metric.get("test_args", {})
# Run the query without the ability to retry.
res = sample_metric(dbname, name, args, retry=False)
try:
res = sample_metric(dbname, name, args, retry=False)
except MetricVersionError:
print("{} -> Unsupported for this version".format(name))
continue
# Compare the result to the provided sample results
# TODO
print("{} -> {}".format(name, res))
@@ -714,6 +718,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
except LatestVersionCheckError as e:
log.error("Failed to retrieve latest version information: {}".format(e))
self._reply(503, "Failed to retrieve latest version info")
return
# Note: parse_qs returns the values as a list. Since we always expect
# single values, just grab the first from each.