Raxol.Test.PerformanceHelpers (Raxol v0.3.0)

View Source

DEPRECATED: Use Raxol.Test.PerformanceHelper instead. This module is deprecated and will be removed in a future release. Please update your tests to use Raxol.Test.PerformanceHelper.

Summary

Functions

Asserts that a set of concurrent operations' average execution time is below a threshold.

Asserts that an operation's memory usage is below a threshold.

Asserts that an operation's average execution time is below a threshold.

Measures the average execution time of an operation over multiple iterations. Returns the average time in milliseconds.

Measures memory usage of an operation. Returns {memory_in_bytes, result}.

Measures the execution time of an operation. Returns {time_in_ms, result}.

Functions

assert_concurrent_performance(operations, name, threshold \\ 0.002, iterations \\ 1000)

Asserts that a set of concurrent operations' average execution time is below a threshold.

assert_memory_usage(operation, name, threshold \\ 1_000_000)

Asserts that an operation's memory usage is below a threshold.

assert_performance(operation, name, threshold \\ 0.001, iterations \\ 1000)

Asserts that an operation's average execution time is below a threshold.

assert_performance_metrics(operation, name, time_threshold \\ 0.001, memory_threshold \\ 1_000_000)

Measures and asserts both time and memory performance.

measure_average_time(operation, iterations \\ 1000)

Measures the average execution time of an operation over multiple iterations. Returns the average time in milliseconds.

measure_memory(operation)

Measures memory usage of an operation. Returns {memory_in_bytes, result}.

measure_time(operation)

This function is deprecated. Use Raxol.Test.PerformanceHelper instead..

Measures the execution time of an operation. Returns {time_in_ms, result}.