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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.4.0 (2025-04-14)

Some nice features (`pre_check: :all_same` is cool) along with adding support for some new stuff (`tprof`) and fixing some bugs.

### Features (User Facing)
* `pre_check` now accepts the option `:all_same` - which raises if any job returns a value different from another for the same input. Useful when benchmarking multiple variants of the same function. Thanks to [@sabiwara](https://github.com/sabiwara)!
* Enable the [`tprof`](https://www.erlang.org/doc/apps/tools/tprof.html) profiler that shipped with OTP 27, requires OTP 27+ and elixir 1.17+.

## Bugfixes (User Facing)
* Make gathering of system data more resilient, if the commands we ran didn't exist it may have crashed previously. Most notably, occurring on Windows 11 due to te removal of the tool we use to gather processor information. Now "N/A" is returned.
* An incompatibility with the upcoming OTP 28 that'd emit a warning on newer elixir versions was removed. Thanks [TBK145](https://github.com/TBK145)!

## 1.3.1 (2024-06-05)

Small release to remove warnings for the upcoming elixir 1.17 as well as add proper solaris support.
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Benchee.Mixfile do
use Mix.Project

@source_url "https://github.com/bencheeorg/benchee"
@version "1.3.1"
@version "1.4.0"

def project do
[
Expand Down
11 changes: 6 additions & 5 deletions samples/pre_check.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Benchee.run(%{"a*2" => fn -> a * 2 end, "a+a" => fn -> a + a end},
pre_check: :all_same
)

Benchee.run(%{"a*2" => fn -> a * 2 end, "a+a" => fn -> a + a + 1 end},
time: 0,
warmup: 0,
pre_check: :all_same
)
# this one is expected to fail, commented out by default so that `run_samples.sh` doesn't quit here
# Benchee.run(%{"a*2" => fn -> a * 2 end, "a+a (wrong)" => fn -> a + a + 1 end},
# time: 0,
# warmup: 0,
# pre_check: :all_same
# )
Loading