Add Custom Pacer for CSV-Based Traffic Patterns
Author: RishygunjalCreated Jan 14, 2026Updated Jan 14, 2026
Proposal
Implementing a custom Pacer which is fired according to a CSV file which the user can attach. The Vegeta follows the trace of the CSV file which can be any random curve which we don't really care except the fact that the inter arrival time between two hits would be same in both.
Background
Vegeta's built-in pacers (Constant, Sine, Linear) don't support realistic load testing with actual transaction timestamps. Financial systems need to replay historical traffic patterns exactly as they occurred, which requires scheduling requests based on real timestamps from CSV data rather than mathematical functions.
Workarounds
Created a CustomPacer that:
- Reads transaction timestamps from CSV files
- Schedules requests at exact times matching historical data
- Handles burst scenarios where multiple transactions occur simultaneously
- Maintains compatibility with existing Vegeta interfaces
Key Changes
- Added
CustomPacerstruct implementing thePacerinterface - Implemented
Pace()method to calculate wait times based on CSV timestamps - Added CSV parsing and sorting logic in main application
- Integrated with Vegeta's attack mechanism
Source: tsenart/vegeta