Expand description
Performance Benchmarking - Comprehensive benchmarking utilities for network components
This module provides utilities to benchmark various network operations:
- Connection establishment latency
- DHT query performance
- Throughput measurements
- Concurrent operation scalability
- Memory usage tracking
- CPU utilization
Useful for performance regression testing and optimization.
§Example
use ipfrs_network::{PerformanceBenchmark, BenchmarkConfig};
let config = BenchmarkConfig::default();
let benchmark = PerformanceBenchmark::new(config);
// Run a connection benchmark
let result = benchmark.bench_connection_establishment(100).await?;
println!("Average connection time: {:.2} ms", result.avg_duration_ms);
println!("P95 latency: {:.2} ms", result.p95_latency_ms);Structs§
- Benchmark
Config - Configuration for performance benchmarking
- Benchmark
Result - Result of a benchmark run
- Performance
Benchmark - Performance benchmark runner
Enums§
- Benchmark
Error - Errors that can occur during benchmarking
- Benchmark
Type - Type of benchmark operation