Module prod_tests

Module prod_tests 

Source
Expand description

Production readiness testing utilities

This module provides comprehensive testing utilities for validating the semantic search system under production-like conditions.

§Features

  • Stress Testing: Validate system behavior under high load
  • Endurance Testing: Long-running tests for memory leaks and stability
  • Chaos Testing: Fault injection and error handling validation
  • Performance Regression: Detect performance degradation
  • Concurrency Testing: Validate thread-safety and race conditions

§Usage

use ipfrs_semantic::prod_tests::{StressTest, StressTestConfig};

let config = StressTestConfig {
    num_threads: 10,
    operations_per_thread: 1000,
    index_size: 10000,
    dimension: 768,
    ..Default::default()
};

let mut stress_test = StressTest::new(config)?;
let results = stress_test.run().await?;

println!("Operations/sec: {:.2}", results.ops_per_second);
println!("Average latency: {:?}", results.avg_latency);
println!("Success rate: {:.2}%", results.success_rate * 100.0);

Structs§

EnduranceTest
Endurance testing framework
EnduranceTestConfig
Endurance test configuration
EnduranceTestResults
Endurance test results
StressTest
Stress testing framework
StressTestConfig
Stress test configuration
StressTestResults
Stress test results