Starting the Web UI
Run Chainbench without the--headless flag to start the web interface:
http://localhost:8089.
The
--target parameter is required to initialize test data, but you can change the target endpoint later in the UI.Accessing the Web Interface
Configure test parameters
Set the number of users, spawn rate, and test duration in the web interface
Changing the Port
By default, the web UI runs on port 8089. You can customize this:http://localhost:9000.
Adjustable Parameters in the UI
Once the web UI is running, you can modify:During Test Setup
- Number of users: Total simulated users for the test
- Spawn rate: How many users to spawn per second
- Test duration: How long to run the test (e.g.,
1h,30m) - Host/Target: The endpoint to test
During Test Execution
- Add or remove users: Dynamically adjust load
- Stop test: Halt the test at any time
- View real-time statistics: Request rates, response times, failures
Selecting User Classes
Start without specifying a profile to select which user classes (method groups) to use:When using
--profile-dir without a specific profile, all profiles in that directory will be available for selection in the UI.Testing with Multiple Profiles
Load multiple profile directories for comprehensive testing:Web UI Features
Real-Time Monitoring
The web interface provides:- Request statistics: RPS (requests per second), total requests, failures
- Response time charts: Min, max, median, 95th percentile
- Distribution graphs: Response time distribution across all requests
- Failure tracking: Error rates and exception details
Charts and Visualizations
- Total requests per second: Shows overall throughput
- Response times: Tracks latency over time
- Number of users: Displays active users throughout the test
Download Results
After the test completes, download:- Statistics CSV files
- Exception logs
- Summary reports
Testing Individual Methods
You can start the UI to test a specific method:eth_blockNumber method, but you can still adjust users, spawn rate, and duration through the interface.
Changing Test Parameters Mid-Test
Scaling Up Users
- Enter a higher number in the “Number of users” field
- Click “Update” or press Enter
- New users will spawn at the configured spawn rate
Scaling Down Users
- Enter a lower number in the “Number of users” field
- Click “Update” or press Enter
- Excess users will stop gracefully
Web UI vs Headless Mode
| Feature | Web UI Mode | Headless Mode |
|---|---|---|
| Real-time visualization | ✓ | ✗ |
| Adjust parameters live | ✓ | ✗ |
| Automatic termination | ✗ | ✓ (with --autoquit) |
| Remote server deployment | Limited | ✓ |
| Monitors support | ✗ | ✓ |
| Class picker | ✓ | ✗ |
Remote Access to Web UI
To access the web UI from a remote server, use SSH port forwarding:http://localhost:8089.
Best Practices for Web UI Mode
Development and Testing
- Use small test data sizes (XS or S)
- Start with a single worker
- Test against development nodes first
- Validate configuration before long runs
Interactive Analysis
- Monitor response time charts for anomalies
- Watch for sudden failure rate increases
- Observe patterns in request distribution
- Use the UI to find optimal user counts
Switching to Headless
Once you’ve validated your test configuration in the UI, run production tests in headless mode:The web UI is perfect for experimentation and analysis, but use headless mode with
--autoquit for automated, long-running tests.Troubleshooting
Can’t Access Web UI
Check that:- The port (default 8089) isn’t blocked by a firewall
- No other service is using the same port
- Chainbench started without errors
UI Shows No Data
Ensure you’ve:- Started the test by clicking “Start swarming”
- Specified valid target endpoint
- Configured users and spawn rate
Test Data Initialization Failed
Verify:- Target endpoint is accessible and responding
- You have network connectivity
- The endpoint supports the required RPC methods