{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# PCCX v002 Latency Benchmark Record\n",
        "\n",
        "Source scope: existing v002 benchmark CSV rows in the research repository. This notebook recomputes simple aggregates from the recorded rows only."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {},
      "source": [
        "experiment_results = [\n",
        "    {\"run\": 1, \"input_tokens\": 21, \"output_tokens\": 64, \"prefill_ms\": 33983.8, \"decode_mean_ms\": 1521.5, \"decode_std_ms\": 396.0, \"tok_s\": 0.66, \"elapsed_s\": 144.9},\n",
        "    {\"run\": 2, \"input_tokens\": 21, \"output_tokens\": 64, \"prefill_ms\": 29338.0, \"decode_mean_ms\": 1488.4, \"decode_std_ms\": 337.1, \"tok_s\": 0.67, \"elapsed_s\": 137.7},\n",
        "    {\"run\": 3, \"input_tokens\": 21, \"output_tokens\": 64, \"prefill_ms\": 29087.6, \"decode_mean_ms\": 1259.2, \"decode_std_ms\": 193.6, \"tok_s\": 0.79, \"elapsed_s\": 120.2},\n",
        "    {\"run\": 4, \"input_tokens\": 21, \"output_tokens\": 64, \"prefill_ms\": 19946.3, \"decode_mean_ms\": 926.6, \"decode_std_ms\": 142.6, \"tok_s\": 1.08, \"elapsed_s\": 88.8},\n",
        "    {\"run\": 5, \"input_tokens\": 21, \"output_tokens\": 64, \"prefill_ms\": 17125.6, \"decode_mean_ms\": 894.4, \"decode_std_ms\": 144.1, \"tok_s\": 1.12, \"elapsed_s\": 83.4},\n",
        "]\n",
        "\n",
        "def mean(values):\n",
        "    return sum(values) / len(values)\n",
        "\n",
        "summary = {\n",
        "    \"rows\": len(experiment_results),\n",
        "    \"average_decode_mean_ms\": round(mean([row[\"decode_mean_ms\"] for row in experiment_results]), 1),\n",
        "    \"prefill_ms_min\": min(row[\"prefill_ms\"] for row in experiment_results),\n",
        "    \"prefill_ms_max\": max(row[\"prefill_ms\"] for row in experiment_results),\n",
        "    \"tok_s_min\": min(row[\"tok_s\"] for row in experiment_results),\n",
        "    \"tok_s_max\": max(row[\"tok_s\"] for row in experiment_results),\n",
        "}\n",
        "summary"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "## Boundary\n",
        "\n",
        "The recorded rows support only the simple latency summary above. Board-level readiness, timing closure, and release benchmark status require separate evidence records."
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.x"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}
