Skip to main content

feat: add working application and synthetic sample data

GBB Demo authored on Nov 2, 2026

commit 05d24d3b1048

Root commit: changes are relative to an empty tree.

4 files changed, +38 −0

  • .gitignore+3 −0
    @@ -1,0 +1,3 @@
    1+__pycache__/
    2+node_modules/
    3+.env
  • README.md+5 −0
    @@ -1,0 +1,5 @@
    1+# Metrics Pipeline
    2+
    3+A CSV metrics summarizer with nearest-rank percentiles and input validation.
    4+
    5+Synthetic evaluation project.
  • app.py+15 −0
    @@ -1,0 +1,15 @@
    1+import csv
    2+import math
    3+
    4+def summarize(values):
    5+ values = sorted(float(value) for value in values)
    6+ if not values:
    7+ return {"count": 0, "mean": None, "p95": None}
    8+ if any(not math.isfinite(value) or value < 0 for value in values):
    9+ raise ValueError("Metrics must be finite and nonnegative")
    10+ return {"count": len(values), "mean": sum(values) / len(values),
    11+ "p95": values[math.ceil(len(values) * 0.95) - 1]}
    12+
    13+def summarize_csv(handle):
    14+ return summarize(row["latency_ms"] for row in csv.DictReader(handle))
    15+
  • data/sample.json+15 −0
    @@ -1,0 +1,15 @@
    1+{
    2+ "environment": "demo",
    3+ "items": [
    4+ {
    5+ "id": "sample-1",
    6+ "name": "Explore the source",
    7+ "done": true
    8+ },
    9+ {
    10+ "id": "sample-2",
    11+ "name": "Review the draft PR",
    12+ "done": false
    13+ }
    14+ ]
    15+}