# krausest/js-framework-benchmark architecture

> Architecture diagram of the GitHub repository krausest/js-framework-benchmark, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krausest/js-framework-benchmark
- Repository: https://github.com/krausest/js-framework-benchmark

## Overview

js-framework-benchmark compares keyed and non-keyed implementations by running browser workloads and reporting timings, memory, startup, Lighthouse, and transfer metrics. The principal workflow is to serve a framework implementation, execute benchmark iterations, and inspect the generated results. The server also exposes framework metadata, static assets, CSP checks, and response-size controls. The README documents the benchmark stages and metrics; sampled source confirms server routing and selected implementation behavior, but the benchmark driver internals and many framework implementations were not inspected.

Main entry points: [`webdriver-ts/src/timeline.ts`](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts) (Browser workloads), [`server/app.ts`](https://github.com/krausest/js-framework-benchmark/blob/master/server/app.ts) (HTTP server), [`server/src/static/staticRouter.ts`](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/static/staticRouter.ts) (Static assets), [`webdriver-ts-results/src/App.tsx`](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts-results/src/App.tsx) (Benchmark index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Benchmark web app"]
  node_benchmark_index["Benchmark index<br/>[App.tsx]"]
  node_result_tables["Result tables<br/>[ResultTable.tsx]"]
end

subgraph group_impls["Framework implementations"]
  node_keyed["Keyed variants"]
  node_nonkeyed["Non-keyed variants"]
  node_broken_variants["Broken variants"]
end

subgraph group_runner["Benchmark execution"]
  node_browser["Browser workloads<br/>[timeline.ts]"]
  node_row_operations["Row operations<br/>[timeline.ts]"]
  node_memory_metrics["Memory metrics<br/>[timeline.ts]"]
  node_startup_metrics["Startup and Lighthouse<br/>[timeline.ts]"]
  node_benchmark_results["Benchmark results"]
end

subgraph group_server["Local server"]
  node_server_app["HTTP server<br/>[app.ts]"]
  node_framework_routes["Framework routes"]
  node_framework_service["Framework metadata"]
  node_static_routes["Static assets<br/>[staticRouter.ts]"]
  node_csp_routes["CSP reporting<br/>[cspControllers.ts]"]
  node_response_size["Response size"]
  node_size_accounting["Size accounting"]
end

node_user(("Benchmark user"))

node_user -->|"reviews results"| node_benchmark_index
node_user -->|"runs benchmarks"| node_browser
node_benchmark_index -->|"renders tables"| node_result_tables
node_browser -->|"loads implementations"| node_keyed
node_browser -->|"loads implementations"| node_nonkeyed
node_browser -.->|"may test"| node_broken_variants
node_browser -->|"measures operations"| node_row_operations
node_browser -->|"measures memory"| node_memory_metrics
node_browser -->|"measures startup"| node_startup_metrics
node_browser -->|"produces results"| node_benchmark_results
node_user -->|"starts locally"| node_server_app
node_server_app -->|"registers routes"| node_framework_routes
node_framework_routes -->|"loads metadata"| node_framework_service
node_server_app -->|"registers routes"| node_static_routes
node_static_routes -->|"serves files"| node_keyed
node_static_routes -->|"serves files"| node_nonkeyed
node_server_app -->|"registers routes"| node_csp_routes
node_server_app -->|"registers routes"| node_response_size
node_server_app -->|"configures accounting"| node_size_accounting
node_response_size -.->|"controls totals"| node_size_accounting

click node_benchmark_index "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts-results/src/App.tsx"
click node_result_tables "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts-results/src/components/ResultTable/ResultTable.tsx"
click node_keyed "https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed"
click node_nonkeyed "https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/non-keyed"
click node_broken_variants "https://github.com/krausest/js-framework-benchmark/tree/master/broken-frameworks"
click node_browser "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts"
click node_row_operations "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts"
click node_memory_metrics "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts"
click node_startup_metrics "https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts"
click node_benchmark_results "https://github.com/krausest/js-framework-benchmark/tree/master/webdriver-ts-results"
click node_server_app "https://github.com/krausest/js-framework-benchmark/blob/master/server/app.ts"
click node_framework_routes "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/frameworks/frameworksControllers.ts"
click node_framework_service "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/frameworks/frameworksServices.ts"
click node_static_routes "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/static/staticRouter.ts"
click node_csp_routes "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/csp/cspControllers.ts"
click node_response_size "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/responseSize/responseSizeController.ts"
click node_size_accounting "https://github.com/krausest/js-framework-benchmark/blob/master/server/src/responseSize/responseSizeDecorator.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_benchmark_index,node_result_tables,node_user toneBlue
class node_keyed,node_nonkeyed,node_broken_variants toneAmber
class node_browser,node_row_operations,node_memory_metrics,node_startup_metrics,node_benchmark_results toneMint
class node_server_app,node_framework_routes,node_framework_service,node_static_routes,node_csp_routes,node_response_size,node_size_accounting toneRose
```

## Components

### Benchmark web app

- [Benchmark index](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts-results/src/App.tsx): `webdriver-ts-results/src/App.tsx`
- [Result tables](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts-results/src/components/ResultTable/ResultTable.tsx): `webdriver-ts-results/src/components/ResultTable/ResultTable.tsx`

### Framework implementations

- [Keyed variants](https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed): `frameworks/keyed`
- [Non-keyed variants](https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/non-keyed): `frameworks/non-keyed`
- [Broken variants](https://github.com/krausest/js-framework-benchmark/tree/master/broken-frameworks): `broken-frameworks`

### Benchmark execution

- [Browser workloads](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts): `webdriver-ts/src/timeline.ts`
- [Row operations](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts): `webdriver-ts/src/timeline.ts`
- [Memory metrics](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts): `webdriver-ts/src/timeline.ts`
- [Startup and Lighthouse](https://github.com/krausest/js-framework-benchmark/blob/master/webdriver-ts/src/timeline.ts): `webdriver-ts/src/timeline.ts`
- [Benchmark results](https://github.com/krausest/js-framework-benchmark/tree/master/webdriver-ts-results): `webdriver-ts-results`

### Local server

- [HTTP server](https://github.com/krausest/js-framework-benchmark/blob/master/server/app.ts): `server/app.ts`
- [Framework routes](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/frameworks/frameworksControllers.ts): `server/src/frameworks/frameworksControllers.ts`
- [Framework metadata](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/frameworks/frameworksServices.ts): `server/src/frameworks/frameworksServices.ts`
- [Static assets](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/static/staticRouter.ts): `server/src/static/staticRouter.ts`
- [CSP reporting](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/csp/cspControllers.ts): `server/src/csp/cspControllers.ts`
- [Response size](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/responseSize/responseSizeController.ts): `server/src/responseSize/responseSizeController.ts`
- [Size accounting](https://github.com/krausest/js-framework-benchmark/blob/master/server/src/responseSize/responseSizeDecorator.ts): `server/src/responseSize/responseSizeDecorator.ts`

### Other components

- **Benchmark user**

## Connections

- Benchmark user → Benchmark index: reviews results
- Benchmark user → Browser workloads: runs benchmarks
- Benchmark index → Result tables: renders tables (evidence: `webdriver-ts-results/src/App.tsx`)
- Browser workloads → Keyed variants: loads implementations
- Browser workloads → Non-keyed variants: loads implementations
- Browser workloads → Broken variants: may test
- Browser workloads → Row operations: measures operations
- Browser workloads → Memory metrics: measures memory
- Browser workloads → Startup and Lighthouse: measures startup
- Browser workloads → Benchmark results: produces results
- Benchmark user → HTTP server: starts locally
- HTTP server → Framework routes: registers routes (evidence: `server/app.ts`)
- Framework routes → Framework metadata: loads metadata (evidence: `server/src/frameworks/frameworksControllers.ts`)
- HTTP server → Static assets: registers routes (evidence: `server/app.ts`)
- Static assets → Keyed variants: serves files (evidence: `server/src/static/staticRouter.ts`)
- Static assets → Non-keyed variants: serves files (evidence: `server/src/static/staticRouter.ts`)
- HTTP server → CSP reporting: registers routes (evidence: `server/app.ts`)
- HTTP server → Response size: registers routes (evidence: `server/app.ts`)
- HTTP server → Size accounting: configures accounting (evidence: `server/app.ts`)
- Response size → Size accounting: controls totals
