# danielesavino/fastest architecture

> Architecture diagram of the GitHub repository danielesavino/fastest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielesavino/fastest
- Repository: https://github.com/danielesavino/fastest

## Overview

fastest is a macro-based C testing framework with a Python extension and orchestration package. Its main workflow registers custom tests before main, executes them through the scheduler, and exposes results to C or Python callers. QUICKTEST is a separate immediate-result mode. Python adds repeated benchmark comparisons and optional plotting. The tree and excerpts show the Python-to-extension API and registration macros; scheduler implementation and several runtime details were not sampled, so those links rely on README statements.

Main entry points: [`fastest_py/src/fastest/runner.py`](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/runner.py) (Runner and comparisons), [`include/fastest/custom_tests.h`](https://github.com/danielesavino/fastest/blob/main/include/fastest/custom_tests.h) (Custom test macros), [`include/fastest/quick_tests.h`](https://github.com/danielesavino/fastest/blob/main/include/fastest/quick_tests.h) (Quick tests), [`bindings/pybind.cpp`](https://github.com/danielesavino/fastest/blob/main/bindings/pybind.cpp) (Python extension)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_c_runtime["C test runtime"]
  node_custom_macros["Custom test macros<br/>[custom_tests.h]"]
  node_quick_tests["Quick tests<br/>[quick_tests.h]"]
  node_test_types["Test types and flags<br/>[tests.h]"]
  node_scheduler[("Test scheduler<br/>[test_list.c]")]
  node_c_logging["C result logging<br/>[logging.c]"]
end

subgraph group_python_api["Python API"]
  node_pybind["Python extension<br/>[pybind.cpp]"]
  node_py_facade["Package facade<br/>[__init__.py]"]
  node_py_flags["Python flags<br/>[flags.py]"]
  node_py_logging["Python formatting<br/>[logging.py]"]
end

subgraph group_benchmarking["Benchmarking"]
  node_runner["Runner and comparisons<br/>[runner.py]"]
  node_plotter["Benchmark plotting<br/>[plotting.py]"]
end

node_c_user(("C test author"))
node_py_user(("Python caller"))
node_matplotlib["Matplotlib"]

node_c_user -->|"declares tests"| node_custom_macros
node_custom_macros -->|"registers tests"| node_scheduler
node_c_user -->|"runs tests"| node_scheduler
node_c_user -->|"runs expressions"| node_quick_tests
node_quick_tests -->|"sets test output"| node_test_types
node_quick_tests -.->|"logs results"| node_c_logging
node_custom_macros -->|"creates outputs"| node_test_types
node_py_user -->|"calls package"| node_py_facade
node_py_facade -->|"delegates to"| node_runner
node_runner -->|"calls backend"| node_pybind
node_pybind -->|"queries and runs"| node_scheduler
node_pybind -->|"serializes results"| node_test_types
node_runner -->|"formats test status"| node_py_flags
node_py_flags -->|"colors status"| node_py_logging
node_runner -->|"supplies comparisons"| node_plotter
node_plotter -->|"renders charts"| node_matplotlib

click node_custom_macros "https://github.com/danielesavino/fastest/blob/main/include/fastest/custom_tests.h"
click node_quick_tests "https://github.com/danielesavino/fastest/blob/main/include/fastest/quick_tests.h"
click node_test_types "https://github.com/danielesavino/fastest/blob/main/include/fastest/tests.h"
click node_scheduler "https://github.com/danielesavino/fastest/blob/main/src/test_list.c"
click node_c_logging "https://github.com/danielesavino/fastest/blob/main/src/logging.c"
click node_pybind "https://github.com/danielesavino/fastest/blob/main/bindings/pybind.cpp"
click node_runner "https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/runner.py"
click node_py_facade "https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/__init__.py"
click node_py_flags "https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/flags.py"
click node_py_logging "https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/logging.py"
click node_plotter "https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/plotting.py"

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_custom_macros,node_quick_tests,node_test_types,node_scheduler,node_c_logging toneBlue
class node_pybind,node_py_facade,node_py_flags,node_py_logging toneAmber
class node_runner,node_plotter toneMint
class node_c_user,node_py_user,node_matplotlib toneIndigo
```

## Components

### C test runtime

- [Custom test macros](https://github.com/danielesavino/fastest/blob/main/include/fastest/custom_tests.h): `include/fastest/custom_tests.h`
- [Quick tests](https://github.com/danielesavino/fastest/blob/main/include/fastest/quick_tests.h): `include/fastest/quick_tests.h`
- [Test types and flags](https://github.com/danielesavino/fastest/blob/main/include/fastest/tests.h): `include/fastest/tests.h`
- [Test scheduler](https://github.com/danielesavino/fastest/blob/main/src/test_list.c): `src/test_list.c`
- [C result logging](https://github.com/danielesavino/fastest/blob/main/src/logging.c): `src/logging.c`

### Python API

- [Python extension](https://github.com/danielesavino/fastest/blob/main/bindings/pybind.cpp): `bindings/pybind.cpp`
- [Package facade](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/__init__.py): `fastest_py/src/fastest/__init__.py`
- [Python flags](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/flags.py): `fastest_py/src/fastest/flags.py`
- [Python formatting](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/logging.py): `fastest_py/src/fastest/logging.py`

### Benchmarking

- [Runner and comparisons](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/runner.py): `fastest_py/src/fastest/runner.py`
- [Benchmark plotting](https://github.com/danielesavino/fastest/blob/main/fastest_py/src/fastest/plotting.py): `fastest_py/src/fastest/plotting.py`

### Other components

- **C test author**
- **Python caller**
- **Matplotlib**

## Connections

- C test author → Custom test macros: declares tests (evidence: `README.md`)
- Custom test macros → Test scheduler: registers tests (evidence: `include/fastest/custom_tests.h`)
- C test author → Test scheduler: runs tests (evidence: `README.md`)
- C test author → Quick tests: runs expressions (evidence: `README.md`)
- Quick tests → Test types and flags: sets test output (evidence: `include/fastest/quick_tests.h`)
- Quick tests → C result logging: logs results
- Custom test macros → Test types and flags: creates outputs (evidence: `include/fastest/custom_tests.h`)
- Python caller → Package facade: calls package (evidence: `README.md`)
- Package facade → Runner and comparisons: delegates to (evidence: `fastest_py/src/fastest/__init__.py`)
- Runner and comparisons → Python extension: calls backend (evidence: `README.md`)
- Python extension → Test scheduler: queries and runs (evidence: `bindings/pybind.cpp`)
- Python extension → Test types and flags: serializes results (evidence: `bindings/pybind.cpp`)
- Runner and comparisons → Python flags: formats test status (evidence: `fastest_py/src/fastest/runner.py`)
- Python flags → Python formatting: colors status (evidence: `fastest_py/src/fastest/flags.py`)
- Runner and comparisons → Benchmark plotting: supplies comparisons (evidence: `fastest_py/src/fastest/plotting.py`)
- Benchmark plotting → Matplotlib: renders charts (evidence: `fastest_py/src/fastest/plotting.py`)
