A performance benchmarking tool that executes one billion loops to measure system performance using Elixir's concurrent capabilities.
This module implements a billion-loop benchmark using:
- Chunked processing (1M iterations per chunk)
- Concurrent execution using
Task.async_stream - Automatic detection of available CPU schedulers
- Tail-recursive implementation for memory efficiency
Run the benchmark in an IEx session:
# Start IEx with the project
iex -S mix
# The benchmark will automatically run and display timing results- Total iterations: 1,000,000,000
- Chunk size: 1,000,000 (configurable)
- Concurrency: Matches available CPU schedulers
- Implementation: Tail-recursive countdown function
If available in Hex, the package can be installed
by adding onebillionloops to your list of dependencies in mix.exs:
def deps do
[
{:onebillionloops, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/onebillionloops.