Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
otp_version: '27.3'
- elixir_version: '1.19'
otp_version: '28.3'
- elixir_version: '1.20.0'
otp_version: '29.0'
type_check: true
lint: true
- elixir_version: '1.20.0-rc.6'
otp_version: '29.0'

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion test/benchee/benchmark/runner_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ defmodule Benchee.Benchmark.RunnerTest do
end

test "max_sample_size is abided by across all times" do
max_sample_size = 3
max_sample_size = 2

%Suite{scenarios: [scenario]} =
%Suite{
Expand Down
23 changes: 1 addition & 22 deletions test/benchee_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -534,28 +534,7 @@ defmodule BencheeTest do
)

Enum.each(suite.scenarios, fn scenario ->
# if this becomes flakey, change to <=
assert scenario.run_time_data.statistics.sample_size == @default_max_sample_size
end)
end)
end

@tag :performance
test "max_sample_size can be set to `nil` to gather unlimited samples again" do
# not disabling the formatters as I want the formatters to run through with that as well
capture_io(fn ->
suite =
Benchee.run(
%{
"fast" => fn -> :fast end
},
time: 1,
warmup: 0,
max_sample_size: nil
)

Enum.each(suite.scenarios, fn scenario ->
assert scenario.run_time_data.statistics.sample_size > @default_max_sample_size
assert scenario.run_time_data.statistics.sample_size <= @default_max_sample_size
end)
end)
end
Expand Down
Loading