bencheeorg / bencheeorg/benchee
Bench modules (ExUnit-style benchmarks definitions) (DSL)
- Dominant language
- Elixir
- Stars
- 1.5k
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
I am thinking about writing support for ExUnit-style benchmarks (if there is no work toward such thing yet). And I am having something like that in mind:
```elixir
defmodule SampleBench do
use Benchee.Unit
bench do
input "Small (1 Thousand)", do: Enum.to_list(1..1_000)
input "Middle (100 Thousand)", do: Enum.to_list(1..100_000)
setup_all input do
{Enum.shuffle(input), fn i -> [i, i + 1] end}
end
func "flat_map", {input, func} do
Enum.flat_map(input, func)
end
func "map.flatten", {input, func} do
input |> Enum.map(func) |> List.flatten
end
end
end
```
Any suggestions or other propositions for the syntax?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue proposes an ExUnit-style benchmark DSL through a SampleBench module using Benchee.Unit, but names no implementation files or tests. First review the existing benchmark-definition API, then determine whether the proposed syntax and semantics have a clear design; done would mean an agreed DSL specification and corresponding implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100