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: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ jobs:
- elixir_version: '1.18'
otp_version: '27.3'
- elixir_version: '1.19'
otp_version: '28.1'
otp_version: '28.3'
type_check: true
lint: true
- elixir_version: '1.20.0-rc.1'
otp_version: '28.3'

steps:
- name: Checkout
Expand Down
2 changes: 0 additions & 2 deletions lib/benchee/statistics.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ defmodule Benchee.Statistics do
alias Benchee.{CollectionData, Conversion.Duration, Scenario, Suite}
alias Benchee.Output.ProgressPrinter

require Integer

defstruct [
:average,
:ips,
Expand Down
10 changes: 5 additions & 5 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
%{
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"credo": {:hex, :credo, "1.7.13", "126a0697df6b7b71cd18c81bc92335297839a806b6f62b61d417500d1070ff4e", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "47641e6d2bbff1e241e87695b29f617f1a8f912adea34296fb10ecc3d7e9e84f"},
"credo": {:hex, :credo, "1.7.16", "a9f1389d13d19c631cb123c77a813dbf16449a2aebf602f590defa08953309d4", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d0562af33756b21f248f066a9119e3890722031b6d199f22e3cf95550e4f1579"},
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"dialyxir": {:hex, :dialyxir, "1.4.6", "7cca478334bf8307e968664343cbdb432ee95b4b68a9cba95bdabb0ad5bdfd9a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "8cf5615c5cd4c2da6c501faae642839c8405b49f8aa057ad4ae401cb808ef64d"},
"dialyxir": {:hex, :dialyxir, "1.4.7", "dda948fcee52962e4b6c5b4b16b2d8fa7d50d8645bbae8b8685c3f9ecb7f5f4d", [:mix], [{:erlex, ">= 0.2.8", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b34527202e6eb8cee198efec110996c25c5898f43a4094df157f8d28f27d9efe"},
"doctest_formatter": {:hex, :doctest_formatter, "0.4.1", "c69bf93853d1ec5785cbd22dcf0c2bd4dd357cc53f2e89d05850eed7e985462a", [:mix], [], "hexpm", "c1b07495a524126de133be4e077b28c4a2d8e1a14c9eeca962482e2067b5b068"},
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
"ex_doc": {:hex, :ex_doc, "0.38.4", "ab48dff7a8af84226bf23baddcdda329f467255d924380a0cf0cee97bb9a9ede", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "f7b62346408a83911c2580154e35613eb314e0278aeea72ed7fedef9c1f165b2"},
"erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"},
"ex_doc": {:hex, :ex_doc, "0.40.1", "67542e4b6dde74811cfd580e2c0149b78010fd13001fda7cfeb2b2c2ffb1344d", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "bcef0e2d360d93ac19f01a85d58f91752d930c0a30e2681145feea6bd3516e00"},
"ex_guard": {:hex, :ex_guard, "1.6.1", "adcb30f379c8048b2cb1474052753adecfe9635b9db3bac1a4a4458c5826f735", [:mix], [{:fs, "~> 8.6.1", [hex: :fs, repo: "hexpm", optional: false]}], "hexpm", "14a4d261c9ce951f9ec2487730afc1a008c0f70c95b7fcc2f446b9d7a5346718"},
"excoveralls": {:hex, :excoveralls, "0.18.5", "e229d0a65982613332ec30f07940038fe451a2e5b29bce2a5022165f0c9b157e", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "523fe8a15603f86d64852aab2abe8ddbd78e68579c8525ae765facc5eae01562"},
"file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"},
"fs": {:hex, :fs, "8.6.1", "7c9c0d0211e8c520e4e9eda63b960605c2711839f47285e6166c332d973be8ea", [:rebar3], [], "hexpm", "61ea2bdaedae4e2024d0d25c63e44dccf65622d4402db4a2df12868d1546503f"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},
"makeup_erlang": {:hex, :makeup_erlang, "1.0.3", "4252d5d4098da7415c390e847c814bad3764c94a814a0b4245176215615e1035", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "953297c02582a33411ac6208f2c6e55f0e870df7f80da724ed613f10e6706afd"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
"statistex": {:hex, :statistex, "1.1.0", "7fec1eb2f580a0d2c1a05ed27396a084ab064a40cfc84246dbfb0c72a5c761e5", [:mix], [], "hexpm", "f5950ea26ad43246ba2cce54324ac394a4e7408fdcf98b8e230f503a0cba9cf5"},
"table": {:hex, :table, "0.1.2", "87ad1125f5b70c5dea0307aa633194083eb5182ec537efc94e96af08937e14a8", [:mix], [], "hexpm", "7e99bc7efef806315c7e65640724bf165c3061cdc5d854060f74468367065029"},
Expand Down
6 changes: 3 additions & 3 deletions test/benchee/benchmark/runner_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ defmodule Benchee.Benchmark.RunnerTest do

memory_usages = List.first(new_suite.scenarios).memory_usage_data.samples

assert length(memory_usages) > 0
refute Enum.empty?(memory_usages)
end

test "measures the reduction count of a scenario" do
Expand All @@ -144,7 +144,7 @@ defmodule Benchee.Benchmark.RunnerTest do

reduction_counts = hd(new_suite.scenarios).reductions_data.samples

assert length(reduction_counts) > 0
refute Enum.empty?(reduction_counts)
assert Enum.all?(reduction_counts, fn count -> count >= 305 and count <= 567 end)
end

Expand All @@ -161,7 +161,7 @@ defmodule Benchee.Benchmark.RunnerTest do

memory_usages = List.first(new_suite.scenarios).memory_usage_data.samples

assert length(memory_usages) > 0
refute Enum.empty?(memory_usages)
end

@tag :memory_measure
Expand Down
2 changes: 1 addition & 1 deletion test/benchee/suite_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Benchee.SuiteTest do

test "raises when anything else is tried" do
assert_raise FunctionClauseError, fn ->
deep_merge(@empty_suite, "lol this doesn't fit")
deep_merge(@empty_suite, [])
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/benchee_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
# when setting max_sample_size to `nil` and that the whole process works, this is needed
@default_max_sample_size 1_000_000
@tag :performance
test "max_sample_size by default is set to 1 Million" do

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.13, OTP 25.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.11, OTP 24.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.12, OTP 24.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.14, OTP 25.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.15, OTP 26.2)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.14, OTP 25.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.15, OTP 26.2)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.12, OTP 24.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.13, OTP 25.3)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.16, OTP 26.2)

test max_sample_size by default is set to 1 Million (BencheeTest)

Check failure on line 524 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.11, OTP 24.3)

test max_sample_size by default is set to 1 Million (BencheeTest)
# not disabling the formatters as I want the formatters to run through with that as well
capture_io(fn ->
suite =
Expand All @@ -541,7 +541,7 @@
end

@tag :performance
test "max_sample_size can be set to `nil` to gather unlimited samples again" do

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.13, OTP 25.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.11, OTP 24.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.12, OTP 24.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.14, OTP 25.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.15, OTP 26.2)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.14, OTP 25.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.15, OTP 26.2)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.12, OTP 24.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.13, OTP 25.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.16, OTP 26.2)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)

Check failure on line 544 in test/benchee_test.exs

View workflow job for this annotation

GitHub Actions / Test on Ubuntu (Elixir 1.11, OTP 24.3)

test max_sample_size can be set to `nil` to gather unlimited samples again (BencheeTest)
# not disabling the formatters as I want the formatters to run through with that as well
capture_io(fn ->
suite =
Expand Down Expand Up @@ -667,7 +667,7 @@
)
)

assert length(scenario.run_time_data.samples) > 0
refute Enum.empty?(scenario.run_time_data.samples)
end)
end

Expand Down
Loading