diff --git a/README.md b/README.md
index 6d38ef7..67c25cf 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,19 @@
# Alkane benchmarks
-[](https://gitea.bluefla.re/blueflare/alkane-benchmarks/actions)
-[](https://gitea.bluefla.re/blueflare/alkane-benchmarks/actions)
-
-
-
-
-
-
-
+[](https://gitea.bluefla.re/blueflare/alkane-benchmarks/actions)

Public [benchmark history](https://blueflare.gitea.bluefla.re/alkane-benchmarks/)
-for Alkane SDK, OS, and Toolkit. Scheduled publishers copy measured host data
-after CI. Source repositories remain private. These results do not measure
-miner boards or qualify a release.
+for the Alkane SDK and OS, whose source repositories are private. Publishers
+copy measured host data after CI. These results do not measure miner boards
+or qualify a release.
-This site has no microbenchmarks of its own, so its bench badges read `n/a`.
-Its coverage badge measures the site validator and version selector.
+The toolkit is public and publishes its own benchmarks, badges and quality
+dashboard at .
+
+This repository holds only the site validator and publishing scripts, so it
+shows no test, coverage or size badges: those would describe the scripts, not
+the SDK or OS.
## Branches
diff --git a/ci/check_live_pages.py b/ci/check_live_pages.py
index 730fcdc..8cfaac7 100644
--- a/ci/check_live_pages.py
+++ b/ci/check_live_pages.py
@@ -1,6 +1,9 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
-"""Check that benchmark Pages are public and source repository Pages stay closed."""
+"""Check that benchmark Pages are public and private source repositories stay closed.
+
+The toolkit repository is public and serves its own site, benchmarks included.
+"""
from urllib.error import HTTPError, URLError
from urllib.request import HTTPRedirectHandler, Request, build_opener
@@ -11,9 +14,10 @@ PUBLIC = (
"/alkane-benchmarks/",
"/alkane-benchmarks/sdk/",
"/alkane-benchmarks/os/",
- "/alkane-benchmarks/toolkit/",
+ "/alkane-toolkit/",
+ "/alkane-toolkit/bench/",
)
-PRIVATE = ("/alkane-sdk/", "/alkane-os/", "/alkane-toolkit/")
+PRIVATE = ("/alkane-sdk/", "/alkane-os/")
class NoRedirect(HTTPRedirectHandler):
diff --git a/ci/metrics.py b/ci/metrics.py
index dadd2af..fc3a2f1 100644
--- a/ci/metrics.py
+++ b/ci/metrics.py
@@ -68,6 +68,18 @@ def svg(label: str, value: str, color: str) -> bytes:
f'font-family="sans-serif" font-size="11">{value}\n').encode()
+# Same bands as the toolkit's quality grade: coverage sets the grade.
+GRADE_BANDS = ((80.0, "A", "#2ea043"), (60.0, "B", "#7cb342"), (40.0, "C", "#d4a72c"),
+ (20.0, "D", "#e16f24"))
+
+
+def grade(coverage: float) -> tuple[str, str]:
+ for floor, letter, color in GRADE_BANDS:
+ if coverage >= floor:
+ return letter, color
+ return "F", "#cf222e"
+
+
def generate() -> tuple[dict[str, bytes], dict]:
tests, coverage = tests_and_coverage()
sources = list((ROOT / "ci").glob("*.py"))
@@ -76,14 +88,15 @@ def generate() -> tuple[dict[str, bytes], dict]:
if line.strip() and not line.lstrip().startswith("#"))
if "MIT License" not in (ROOT / "LICENSE").read_text():
raise RuntimeError("site license is not MIT")
+ letter, color = grade(coverage)
values = {
"tests": (str(tests), "#2ea043"),
- "coverage": (f"{coverage:.1f}%", "#2ea043"),
+ "coverage": (f"{coverage:.1f}%", color),
"bench": ("n/a", "#777"),
"bench-coverage": ("n/a", "#777"),
"loc": (compact_lines(lines), "#0969da"),
"dependencies": ("0", "#2ea043"),
- "quality": ("A", "#2ea043"),
+ "quality": (letter, color),
"license": ("MIT", "#0969da"),
}
labels = {"bench-coverage": "bench coverage", "loc": "LOC",
@@ -94,7 +107,7 @@ def generate() -> tuple[dict[str, bytes], dict]:
"statement_coverage_percent": round(coverage, 1),
"source_lines": lines, "dependencies": 0,
"benchmarks": None, "benchmark_coverage_percent": None,
- "quality": "A", "license": "MIT"}
+ "quality": letter, "license": "MIT"}
return badges, metrics
diff --git a/ci/test_validate_site.py b/ci/test_validate_site.py
index 5d924a1..d1057e9 100644
--- a/ci/test_validate_site.py
+++ b/ci/test_validate_site.py
@@ -12,7 +12,7 @@ from validate_site import validate
INDEX = """
Alkane benchmarks
Alkane benchmarks
SDK
-OSToolkit"""
+OS