Skip to content

Commit

Permalink
Old OTP or elixir versions are not yet ready for the mighty ł
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Jul 26, 2018
1 parent e0c2e6d commit a422744
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion test/benchee/benchmark/measure/memory_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ defmodule Benchee.MemoryMeasureTest do
@moduletag :memory_measure

describe "measure/1" do

@tag :otp_21_memory_problems
test "returns the result of the function and the memory used (in bytes)" do
fun_to_run = fn -> Enum.to_list(1..10) 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 @@ -634,7 +634,7 @@ defmodule BencheeTest do
end

@tag :otp_21_memory_problems
test "the micro keyword list code from Michał does not break memory measurements #213" do
test "the micro keyword list code from Michal does not break memory measurements #213" do
benches = %{
"delete old" => fn {kv, key} -> BenchKeyword.delete_v0(kv, key) end,
"delete reverse" => fn {kv, key} -> BenchKeyword.delete_v2(kv, key) end,
Expand Down
11 changes: 6 additions & 5 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ otp_release = List.to_integer(:erlang.system_info(:otp_release))
exclusions = if otp_release > 18, do: [], else: [memory_measure: true]

# See #234
exclusions = if otp_release >= 21 do
[{:otp_21_memory_problems, true} | exclusions]
else
exclusions
end
exclusions =
if otp_release >= 21 do
[{:otp_21_memory_problems, true} | exclusions]
else
exclusions
end

# On Windows we have by far worse time measurements (millisecond level)
# see: https://github.com/PragTob/benchee/pull/195#issuecomment-377010006
Expand Down

0 comments on commit a422744

Please sign in to comment.