global: snapshot

This commit is contained in:
nym21
2026-01-12 22:43:56 +01:00
parent b675b70067
commit 5ffb66c0dc
39 changed files with 8207 additions and 11957 deletions

View File

@@ -41,7 +41,7 @@ def test_all_endpoints():
"""Test fetching last 3 values from all metric endpoints."""
client = BrkClient("http://localhost:3110")
metrics = get_all_metrics(client.tree)
metrics = get_all_metrics(client.metrics)
print(f"\nFound {len(metrics)} metrics")
success = 0
@@ -53,7 +53,8 @@ def test_all_endpoints():
try:
by = metric.by
endpoint = getattr(by, idx_name)()
res = endpoint.range(-3)
# Use the new idiomatic API: tail(3).fetch() or [-3:].fetch()
res = endpoint.tail(3).fetch()
count = len(res["data"])
if count != 3:
failed += 1