Skip to content

performance-studio/openload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenLoad

A full-stack load-testing analytics platform that helps teams measure, visualize, and optimize API performance under load.

What is OpenLoad?

OpenLoad is a modern load-testing analytics tool designed to:

  • Create and manage load tests for HTTP and WebSocket services (gRPC, GraphQL, SOAP architecture in place)
  • Prepare reusable datasets for parameterized load tests β€” collect rows from APIs and inject them as variables
  • Schedule automated tests with cron expressions for continuous performance monitoring
  • Organize tests by projects and services for better scalability tracking
  • Capture detailed metrics from test runs (response times, throughput, error rates)
  • Visualize performance trends with percentile-based analytics (p50, p75, p95, p99)
  • Track historical data to compare performance across test runs

Quick Start

Note: This project uses Reflex 0.9.0+. See Development Requirements below for compatibility notes on icon naming, component API changes, and port configuration.

Option 1: Docker Compose (Recommended)

cd deployment/
docker compose up -d

Services:

The frontend auto-migrates the database schema and loads sample data on first run.

Stop services:

docker compose down

Rebuild after code changes:

docker compose build
docker compose up -d

Option 2: Local Development

Backend (Go) β€” from openload_back/

make build       # Compile binary
make run         # Run with live reloading
make test        # Run all tests
make clean       # Clean build artifacts

The Fiber server listens on http://localhost:8182.

Frontend (Python/Reflex) β€” from openload_front/

pip install -r requirements.txt
reflex init      # One-time setup
reflex run       # Start dev server (auto-compiles on change)

The Reflex dev server listens on http://localhost:8180.


Option 3: Docker Databases + Local Code

# Start only databases
cd deployment/
docker compose up -d postgres clickhouse

# Then run backend/frontend locally (Option 2)

Development Requirements

Runtime Versions

Component Version Notes
Go 1.26 Uses log/slog, slices, cmp, and built-in max/min
Python 3.14 Uses match/case structural pattern matching
Reflex 0.9.0+ See compatibility notes below

Reflex 0.9.0+ Compatibility

This project uses Reflex 0.9.0+. The upgrade introduced breaking changes:

  • Icon naming: Icon names use underscores per Lucide convention (e.g., message_circle_check not check-circle)
  • Callout component: Requires named parameters: rx.callout(text=..., icon=..., color_scheme=...)
  • Port configuration: In dev mode, frontend and backend must run on different ports β€” use --env dev in Docker, not --env prod

Architecture

graph TB
    Client["Browser Client"]
    Frontend["Reflex Frontend<br/>(Python)"]
    Backend["Fiber API Server<br/>(Go)"]
    PG["PostgreSQL<br/>(Projects, Services, Datasets)"]
    CH["ClickHouse<br/>(Timeseries Analytics)"]

    Client -->|HTTP| Frontend
    Frontend -->|HTTP API| Backend
    Backend -->|SQL| PG
    Backend -->|Timeseries| CH

    style Client fill:#e1f5ff
    style Frontend fill:#fff3e0
    style Backend fill:#f3e5f5
    style PG fill:#e8f5e9
    style CH fill:#e8f5e9
Loading

Backend (Go) β€” Clean Architecture with DDD

  • Framework: Fiber v3 HTTP server
  • Database: PostgreSQL for metadata, ClickHouse for analytics
  • Architecture: 4-layer clean architecture (domain β†’ application β†’ infrastructure β†’ delivery)
  • Protocols: HTTP (fully implemented), WebSocket (fully implemented), gRPC/GraphQL/SOAP (stubs registered)
  • Scheduling: Background cron scheduler (infrastructure/scheduler/) for automated test execution
  • Location: openload_back/

Frontend (Python/Reflex) β€” Layered Modular Architecture

  • Framework: Reflex 0.9+ (reactive Python β†’ compiled React)
  • Location: openload_front/openload/
  • Layers:
    • core/api/ β€” per-domain HTTP clients returning typed Pydantic models
    • core/services/ β€” thin wrappers over API clients
    • core/protocols/ β€” load-test protocol plugin system (HTTP, WebSocket, gRPC)
    • shared/models/ β€” Pydantic models for all API types (entities, responses)
    • shared/components/ β€” common UI (sidebar, charts, cards, badges)
    • states/ β€” one state class per feature
    • pages/ β€” thin routing layer, one subdirectory per route group

Data Flow

sequenceDiagram
    User->>Frontend: Create/Run Test
    Frontend->>Backend: HTTP Request
    Backend->>PG: Store Project/Service Metadata
    Backend->>ClickHouse: Write Analytics Data
    Backend->>Frontend: Return Results
    Frontend->>User: Display Metrics & Charts
Loading

Core Features

πŸ—οΈ Projects & Services

  • Organize load tests by projects (e.g., "Mobile API")
  • Define services within projects (e.g., "User Auth", "Payment Gateway")
  • Editable service identifiers and metadata
  • HTTP and WebSocket protocols fully supported; gRPC/GraphQL/SOAP architecture in place

πŸ—„οΈ Prepare Data (Datasets)

  • Collect rows from APIs using configurable routes and extractors (JSONPath or regex)
  • Two collection modes: repeat (N iterations of main routes) or batch (fetch a JSON array, one row per element)
  • Pre/post routes: Run setup/teardown HTTP calls around data collection (e.g., auth β†’ collect β†’ logout)
  • Preview: Test collection with a single iteration before committing to a full run
  • Dataset injection: Select a completed dataset in the load-test wizard; its columns become injectable variables in route templates
  • Versioning: Each re-run increments the dataset version; previous runs are auditable
  • Scoping: Global or project/service-scoped datasets with owner/team visibility
  • SSRF protection: Two-layer defense β€” pre-flight DNS validation + DialContext re-validation at TCP connect

πŸ“Š Analytics & Metrics

  • Response time percentiles: p50, p75, p95, p99
  • Throughput tracking: Requests per second
  • Error analysis: Failure rates and error categorization
  • Historical comparison: Track performance across test runs

πŸ“ˆ Visualization

  • Line charts for response time trends
  • Throughput over time
  • Error rate dashboards
  • Run-to-run performance comparison

βš™οΈ Test Management

  • Create and configure load tests
  • Execute tests against multiple services
  • View detailed run history
  • Link runs to projects and services for better organization

⏰ Scheduled Testing

  • Automated execution: Schedule load tests with cron expressions
  • Continuous monitoring: Run tests automatically on defined schedules
  • Execution history: Track all triggered runs and their results
  • Active/Inactive control: Enable/disable without deleting configuration
  • Edit Scheduled Jobs: Update run configurations without recreating the schedule

πŸ”€ Scenarios, Variable Extraction & Injection

  • Pre/post scenarios: Setup (extract tokens, login) β†’ Main routes β†’ Cleanup
  • Variable extraction: JSONPath and regex-based extraction from response bodies/headers
  • Variable injection: Inject extracted variables into path params, query params, headers, and request body
  • Per-VU isolation: Each virtual user maintains its own variable scope across iterations
  • Template syntax: {{varname}} placeholders in URLs, headers, and bodies; builtins: {{uuid}}, {{timestamp}}, {{random_int:1:100}}, {{random_string:8}}

πŸ”Œ WebSocket Protocol Support

  • Connection persistence: Single WebSocket connection per VU for the entire test duration
  • Message throughput testing: Configurable intervals and read timeouts for round-trip latency measurement
  • Response validation: Exact string / regex / JSONPath validation per message
  • Variable support: Extract from and inject variables into WebSocket messages
  • Mixed scenarios: HTTP pre/post scenarios with WebSocket main routes
  • Connection pooling: Reuse connections across routes with the same target URL
  • Failure tolerance: Configurable failure percentage threshold (default 5%)
  • Warmup support: RPS and Workers mode warmup for both HTTP and WebSocket tests

πŸ“„ Pagination & Filtering

  • Server-side pagination with dynamic filtering (search, status, project, service)
  • Smart sorting by date, name, or status

πŸ”„ Comparative Analysis

  • Side-by-side run comparison: Compare multiple runs to identify performance regressions
  • Delta metrics: Percentage changes relative to a baseline (green = improved, red = degraded)
  • Baseline selection: Set any run as baseline
  • Multi-metric trends: avg, mean, max, min, p50/p75/p95/p99, req/s, error rates aggregated by date
  • Cross-page selection: Select runs from analytics, scheduled runs, and service history pages
  • Optimized data fetching: Batch API endpoint reduces NΓ—2 sequential requests to 1

Project Structure

openload/
β”œβ”€β”€ deployment/                 # Docker Compose, Dockerfiles
β”‚
β”œβ”€β”€ openload_back/              # Go backend (Fiber + Clean Architecture)
β”‚   β”œβ”€β”€ cmd/main/               # Entry point
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ domain/             # Pure business logic (no external deps)
β”‚   β”‚   β”‚   β”œβ”€β”€ dataset/        # Dataset entity, repo interface, status constants
β”‚   β”‚   β”‚   β”œβ”€β”€ execution/      # Runner interface, plan, injector
β”‚   β”‚   β”‚   β”œβ”€β”€ project/        # Project aggregate, errors
β”‚   β”‚   β”‚   └── scheduled/      # Scheduled run entity
β”‚   β”‚   β”œβ”€β”€ application/        # Use cases, DTOs, orchestration
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics/      # Run creation, progress, error events
β”‚   β”‚   β”‚   β”œβ”€β”€ dataset/        # Dataset CRUD, execution, extraction, SSRF guard
β”‚   β”‚   β”‚   β”œβ”€β”€ project/        # Project/service use cases
β”‚   β”‚   β”‚   └── scheduled/      # Scheduled run use cases
β”‚   β”‚   β”œβ”€β”€ infrastructure/
β”‚   β”‚   β”‚   β”œβ”€β”€ execution/      # Protocol runners (HTTP βœ…, WebSocket βœ…, gRPC stub)
β”‚   β”‚   β”‚   β”œβ”€β”€ persistence/    # PostgreSQL + ClickHouse repositories
β”‚   β”‚   β”‚   └── scheduler/      # Cron-based background scheduler
β”‚   β”‚   └── delivery/http/      # Fiber handlers, router (thin adapter layer)
β”‚   └── Makefile
β”‚
β”œβ”€β”€ openload_front/             # Python frontend (Reflex)
β”‚   β”œβ”€β”€ openload/
β”‚   β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”‚   β”œβ”€β”€ api/            # Per-domain HTTP clients (_base, analytics, project, scheduled, prepare_data)
β”‚   β”‚   β”‚   β”œβ”€β”€ services/       # Service wrappers (analytics, project, scheduled)
β”‚   β”‚   β”‚   └── protocols/      # Load-test protocol plugins (HTTP, WebSocket, gRPC)
β”‚   β”‚   β”œβ”€β”€ shared/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/     # Common UI (sidebar, charts, cards, badges, text)
β”‚   β”‚   β”‚   β”œβ”€β”€ models/         # Pydantic models (entities, responses, prepare_data, load_test_config)
β”‚   β”‚   β”‚   β”œβ”€β”€ utils/          # format_date, parse_query_param, validation helpers
β”‚   β”‚   β”‚   └── constants/      # Routes, filter values, run statuses
β”‚   β”‚   β”œβ”€β”€ states/             # One state class per feature
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ compare_state.py / compare_selection_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ dataset_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ load_test_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ prep_data_state.py / prep_data_wizard_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ project_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ run_analytics_state.py
β”‚   β”‚   β”‚   β”œβ”€β”€ scheduled_state.py
β”‚   β”‚   β”‚   └── sidebar_state.py
β”‚   β”‚   └── pages/              # Thin routing layer
β”‚   β”‚       β”œβ”€β”€ analytics/      # Run list
β”‚   β”‚       β”œβ”€β”€ analytics_run/  # Single run detail + live polling
β”‚   β”‚       β”œβ”€β”€ compare/        # Side-by-side comparison
β”‚   β”‚       β”œβ”€β”€ create_test/    # Load-test wizard (HTTP, WebSocket, gRPC tabs)
β”‚   β”‚       β”œβ”€β”€ prepare_data/   # Dataset list, detail, create wizard, route editor
β”‚   β”‚       β”œβ”€β”€ project_detail/ / service_detail/
β”‚   β”‚       └── scheduled_runs/ # List, detail, edit
β”‚   └── requirements.txt
β”‚
└── docs/

Key Concepts

Concept Purpose
Project Top-level container (e.g., "E-Commerce Platform")
Service API endpoint definition under a project (HTTP URL or gRPC method)
Run A single load test execution with captured metrics
Dataset A reusable collection of rows gathered from APIs, injected as variables during load tests
Analytics Time-series data: response times, throughput, errors

Roadmap

Completed

  • βœ… Project and service management
  • βœ… Load test creation and execution (HTTP fully implemented)
  • βœ… Response time analytics with percentiles (p50, p75, p95, p99)
  • βœ… Single-run metrics dashboard and charts
  • βœ… Clean architecture refactor (domain β†’ application β†’ infrastructure β†’ delivery)
  • βœ… Run-Project-Service Linking
  • βœ… Improved Analytics Page with split-panel sidebar filters
  • βœ… Server-Side Pagination with dynamic filtering and sorting
  • βœ… Scheduled Tests with cron expressions and execution history
  • βœ… Edit Scheduled Jobs
  • βœ… Batch Run Fetching (87% faster comparative load)
  • βœ… Database Performance: indexed queries, connection pooling
  • βœ… Comparative Analysis with delta metrics, baseline selection, trend charts
  • βœ… Cross-Page Run Selection
  • βœ… Test Scenarios & Variable Extraction/Injection (pre/post scenarios, JSONPath/regex)
  • βœ… Per-VU Variable Isolation
  • βœ… WebSocket Protocol Support (throughput, validation, extraction, warmup)
  • βœ… Real-Time Live Statistics (2s polling, auto-redirect, progress snapshots)
  • βœ… Prepare Data (Datasets): API-driven row collection, repeat/batch modes, dataset injection into load tests, SSRF protection, preview, versioning
  • βœ… Frontend architecture refactor: states β†’ states/, typed Pydantic API layer, split per-domain clients
  • βœ… Runtime version bump: Go 1.26, Python 3.14
  • βœ… Go modernization: log/slog structured logging, slices package, cmp.Compare, built-in max/min
  • βœ… Python modernization: match/case pattern matching across state dispatchers
  • βœ… Centralized HTTP error handling via WriteError across all handlers

2026 Roadmap

Analysis & Debugging

  • Export & Reports: PDF/CSV export of complete run results
    • Backend: PDF generation with summary, histograms, error logs, timeseries charts
    • Frontend: Export buttons on run detail page

Intelligence & Automation

  • Performance Regression Detection: Automatic detection of degradation vs baseline
    • Compare current run against median of last 5 successful runs
    • Flags response time, error rate, and throughput per route with % delta
    • Essential for scheduled runs continuous monitoring

Multi-Tenancy & Security

  • Multi-user / Teams with RBAC: Team-based project management
    • Backend: User table, JWT auth, granular project permissions
    • Frontend: Login page, team selector, project sharing, audit trail
    • Note: Breaking API change; requires database migration planning

Contributing

Backend (Go)

  1. Follow clean architecture: Domain β†’ Application β†’ Infrastructure β†’ Delivery
  2. Keep domain layer free of external dependencies
  3. Implement repository interfaces in infrastructure layer
  4. Add protocol runners to internal/infrastructure/execution/ (implement domain.execution.Runner)
  5. Register new runners in cmd/main/main.go
  6. Use status constants from domain packages (e.g., domdataset.StatusDraft) β€” never string literals
  7. Use log/slog for structured logging β€” slog.Info/Warn/Error("message", "key", value), never log.Printf
  8. Use slices.Sort / slices.SortFunc / slices.Contains from the slices package instead of the sort package
  9. Use cmp.Compare in slices.SortFunc comparators β€” never subtract integers (overflow risk)
  10. Use the built-in max/min functions (Go 1.21+) β€” no manual helpers needed
  11. Return WriteError(c, err) from handlers for consistent HTTP error responses β€” no ad-hoc c.Status(...).JSON(...) on error paths
  12. Run make test before committing; ensure go build ./... passes

Frontend (Python/Reflex)

  1. Add new state classes to states/ following existing patterns
  2. Add new API methods to the appropriate client in core/api/; return typed Pydantic models, never raw dicts
  3. Add new protocol UI plugins to core/protocols/ (implement ProtocolPlugin base class)
  4. Use shared/models/ for new Pydantic entity and response models
  5. Use shared/ for truly cross-feature components
  6. All imports must be at module level (enforced by Ruff E402)
  7. Use match/case for dispatching on string values β€” replace if/elif chains on active_tab, kind, sort_by, etc.
  8. Use rx.match() instead of nested rx.cond() for pattern matching in templates
  9. Follow copy-mutate-reassign for list state mutations (deepcopy for nested structures)
  10. Run reflex compile and ./fix-python.bat --check before committing

Code Quality

Python (Frontend):

cd openload_front
./fix-python.bat --check  # Windows
./fix-python.sh --check   # macOS/Linux

Go (Backend):

cd openload_back
make test    # All tests must pass
make build   # Must compile without errors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors