Performance and Sleep Audit
This document provides a consolidated audit of all performance-related tests and all instances of Process.sleep
within the test suite. The goal is to provide a clear, actionable list for a holistic refactoring effort.
1. Performance-Related Test Files
The following files are considered performance-related based on their naming (performance
or properties
):
test/property/foundation/beam/processes_properties_test.exs
test/mabeam/performance_monitor_test.exs
test/foundation/process_registry_performance_test.exs
test/property/foundation/event_correlation_properties_test.exs
test/property/foundation/error_properties_test.exs
test/property/foundation/config_validation_properties_test.exs
test/foundation/process_registry/properties.ex
test/property/foundation/infrastructure/rate_limiter_properties_test.exs
test/property/foundation/infrastructure/circuit_breaker_properties_test.exs
2. Process.sleep
Usage Audit
The following is a list of all files in the test suite that use Process.sleep
, with the corresponding line numbers. These represent opportunities for refactoring to more reliable, event-driven approaches.
test_helper.exs
: 22, 130support/unified_registry_helpers.ex
: 300support/test_workers.exs
: 192, 299, 304, 314, 434support/test_supervisor.ex
: 159, 284support/test_process_manager.ex
: 40, 325support/test_agent.ex
: 164, 172support/telemetry_helpers.exs
: 357, 680support/support_infrastructure_test.exs
: 185, 187, 189, 347, 423support/foundation_test_helper.exs
: 179, 184, 390, 424support/concurrent_test_case.ex
: 137security/privilege_escalation_test.exs
: 49, 70, 170, 450mabeam/telemetry_test.exs
: 327mabeam/process_registry_test.exs
: 115, 140, 176mabeam/performance_monitor_test.exs
: 100mabeam/core_test.exs
: 352, 477mabeam/coordination_test.exs
: 303, 313, 334, 549, 600mabeam/comms_test.exs
: 203, 240, 280mabeam/agent_test.exs
: 398mabeam/agent_supervisor_test.exs
: 65mabeam/agent_registry_test.exs
: 87, 388, 419integration/graceful_degradation_integration_test.exs
: 105, 355integration/data_consistency_integration_test.exs
: 26, 157, 183, 551integration/cross_service_integration_test.exs
: 31, 65, 69, 108, 116, 166, 203, 227, 254, 276, 329foundation/process_registry_performance_test.exs
: 38, 74, 135, 208, 244, 304foundation/process_registry_optimizations_test.exs
: 39, 73, 91, 104, 115, 130, 139, 157, 196, 201, 202, 204, 231, 259, 260, 300property/foundation/event_correlation_properties_test.exs
: 235, 344, 481property/foundation/config_validation_properties_test.exs
: 297support/mabeam/test_helpers.exs
: 99, 211, 218, 408mabeam/integration/stress_test.exs
: 34, 377, 419, 438, 443mabeam/integration/simple_stress_test.exs
: 14integration/foundation/service_lifecycle_test.exs
: 32, 71, 119, 149, 179, 198, 211, 317, 377, 417, 436, 445, 505, 558, 564, 615, 1028, 1048integration/foundation/config_events_telemetry_test.exs
: 63, 112, 157, 184, 192, 197, 243foundation/services/service_behaviour_test.exs
: 100, 112, 123, 132, 164, 174, 180, 240foundation/process_registry/properties.ex
: 93, 100, 131, 164, 199, 229, 275, 307, 355, 362, 376, 390unit/foundation/service_registry_test.exs
: 353, 421, 516, 655unit/foundation/process_registry_test.exs
: 127, 441unit/foundation/process_registry_metadata_test.exs
: 156, 184, 189unit/foundation/graceful_degradation_test.exs
: 105, 166unit/foundation/error_context_test.exs
: 413, 425property/foundation/beam/processes_properties_test.exs
: 152, 320, 366property/foundation/infrastructure/rate_limiter_properties_test.exs
: 299property/foundation/infrastructure/circuit_breaker_properties_test.exs
: 426foundation/process_registry/backend/enhanced_ets_test.exs
: 40, 78, 116, 173, 220, 284, 339unit/foundation/services/config_server_test.exs
: 141unit/foundation/services/config_server_resilient_test.exs
: 136, 165, 191, 213, 235, 410, 444unit/foundation/process_registry/unified_test_helpers_test.exs
: 21, 22, 377, 378, 405unit/foundation/process_registry/backend_test.exs
: 122, 126, 175, 182, 328, 332unit/foundation/infrastructure/rate_limiter_test.exs
: 237, 391, 414unit/foundation/infrastructure/connection_manager_test.exs
: 382, 387, 646, 704unit/foundation/infrastructure/circuit_breaker_test.exs
: 230, 242, 273, 427unit/foundation/infrastructure/pool_workers/http_worker_test.exs
: 457