Expand description
Network Load Testing and Stress Testing Utilities
This module provides tools for stress-testing the network layer to understand performance characteristics, identify bottlenecks, and validate scalability.
§Features
- Connection Load Testing: Test behavior under many simultaneous connections
- DHT Query Storms: Stress-test DHT with high query volumes
- Bandwidth Saturation: Test throughput limits
- Provider Record Flooding: Test provider record handling at scale
- Concurrent Operations: Test system under concurrent operations
- Memory Pressure: Test behavior under memory constraints
- Performance Metrics: Detailed performance tracking during tests
§Example
use ipfrs_network::load_tester::{LoadTester, LoadTestConfig, LoadTestType};
use std::time::Duration;
let config = LoadTestConfig {
duration: Duration::from_secs(60),
connection_target: 100,
query_rate: 50, // queries per second
..Default::default()
};
let mut tester = LoadTester::new(config);
let results = tester.run_test(LoadTestType::ConnectionStress)?;
println!("Test passed: {}", results.passed);
println!("Peak connections: {}", results.peak_connections);
println!("Average latency: {:?}", results.average_latency);Structs§
- Load
Test Config - Configuration for load testing
- Load
Test Metrics - Metrics tracking for load tests
- Load
Test Results - Results from a load test
- Load
Tester - Network load tester
Enums§
- Load
Test Error - Error types for load testing
- Load
Test Type - Type of load test to perform