Repository navigation
v.10
Summary
v.10 introduces significant architectural improvements to the load testing engine, focusing on memory efficiency, accurate metrics tracking, and cleaner separation of concerns. The most substantial change is the introduction of a producer-consumer JobQueue pattern that replaces per-request task spawning with a bounded, batched approach. This release also adds comprehensive request tracking (dispatched and shed counts) and fixes several metrics calculation issues.
Major Changes
Architecture: Producer-Consumer JobQueue Pattern
- Replaced per-request task spawning with a bounded producer-consumer model for substantially improved memory efficiency
- Introduced
JobQueue: a 10ms-paced token-bucket producer that batches rate deficit into a single offer - Atomic shedding: requests are dropped atomically in batch by the queue rather than individually per request
- Simplified
InFlightCounterto act solely as an adaptive permit gate (acquire/release) without queueing or shedding logic - Moved all backpressure and drop accounting to
JobQueuefor clearer separation of concerns - Worker pool drains from queue without re-spawning tasks per request
- Memory consumption now stays flat regardless of throughput
- Graceful shutdown: producer stops, workers exhaust queue, cancellation cleans up
Metrics & Request Tracking
- New Metrics: Added
totalDispatchedandtotalShedtoLoadTestEvent.tickfor comprehensive request tracking - Model Tracking: Track dispatched and shed requests in LoadTestModel with proper pause/resume offset handling
- UI Improvements: Display "Sent" as dispatched requests and add dedicated shed requests card
- Icon Clarity: Renamed "Sent" icon from checkmark to paperplane for better UX
Performance Improvements
- RPS Calculations: Moved avgRps calculation to model as computed property, maintained incrementally across operations
- Memory Efficiency: Implemented
maxRetainedPointstrimming to prevent unbounded memory growth in metrics - Render Path: Removed O(n) reduction operations from UI render path for faster updates
State Management
- Pause/Resume: Enhanced offset tracking for elapsed, completed, and failed counters to preserve accumulated values across pause/resume cycles
- Initialization: Offsets properly initialized on run start and updated on pause/completion
Configuration & Logging
- Backpressure Configuration: Added missing
backpressureQueueDepthdecoding from config with 512 as default - Opt-in Logging: Transport logging is now opt-in via
loggingparameter (defaults to false) to eliminate unnecessary overhead - Logging Control: Only wraps adapter with LoggingTransportAdapter when explicitly requested
- Debug Output: Simplified LoggingTransportAdapter logging output for clarity
Bug Fixes
- Fixed avgRps calculation and incremental maintenance across rpsData trimming
- Fixed backpressure queue depth not being read from configuration
- Removed duplicate response text display in StatsTextsTab
- Fixed offset tracking for pause/resume to maintain accurate accumulated counters
UI/UX
- Added connections display in stats grid
- Enhanced stats visualization with shed requests information
- Clearer icon representation for sent requests
Technical Details
Memory Management: The new JobQueue architecture eliminates per-request task creation, resulting in flat memory usage regardless of load level. Previous versions would accumulate tasks when throughput exceeded worker capacity, causing unbounded memory growth.
Metrics Accuracy: RPS averages are now computed and maintained in the model rather than recalculated on every render, and pause/resume cycles no longer reset accumulated counters.
Backpressure Handling: Shedding is now batched atomically at the queue level rather than one request at a time, improving performance and reducing contention.
Comparison with v.9.2
v.9.2 used a per-request task-spawning model where backpressure led to task accumulation. v.9.3 replaces this with a bounded producer-consumer architecture that keeps memory flat under all load conditions. Combined with improved metrics tracking (dispatched/shed visibility) and calculation fixes (incremental RPS, proper offset tracking), v.9.3 provides a more reliable and efficient load testing engine.
The producer-consumer pattern also establishes a cleaner architectural foundation for future performance monitoring and adaptive concurrency enhancements, as sampling and adaptive mechanisms can now operate as pure observers without interfering with core dispatch logic.