Module benchmarking

Module benchmarking 

Source
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§

BenchmarkConfig
Configuration for performance benchmarking
BenchmarkResult
Result of a benchmark run
PerformanceBenchmark
Performance benchmark runner

Enums§

BenchmarkError
Errors that can occur during benchmarking
BenchmarkType
Type of benchmark operation