Architecture
High-level flow
- CLI loads and validates configuration.
- Benchmark engine resolves dependencies and runtime context.
- Requests execute through selected transport engine.
- Metrics, diagnostics, and optional telemetry are collected.
- Results are aggregated and written through reporters.
Main modules
- src/index.ts: benchmark orchestration and request loop
- src/runtime: transport execution, importers, feeder, traffic, dependency resolution
- src/metrics: analytics and reporting orchestration
- src/templates/reporting: HTML and JUnit template builders
- src/distributed: coordinator and worker distributed runtime
- src/observability: Prometheus and OTEL integration
- src/types: contracts and validator
Reporting architecture
- Metrics/reporting delegates rendering to template modules.
- HTML report provides interactive client-side behavior.
- JUnit report supports CI test-style consumption.
Distributed architecture
- Coordinator exposes join, heartbeat, plan, result, and status routes.
- Work is leased to workers and merged on completion.
- Stale worker handling requeues active assignments.
Example
CLI -> Config Validator -> Scheduler/Executor -> Metrics -> Reporters -> Optional Observability Export
glockit run --config benchmark.json --save --reporters json,html,junit