From 58836917fbdd047805f9dff257ce9bc8fabc074c Mon Sep 17 00:00:00 2001 From: Tobias Pfeiffer Date: Mon, 14 Apr 2025 21:29:13 +0200 Subject: [PATCH 1/3] Prep 1.4.0 changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcc859f4..c778b04e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. From 03ff41ea63dcad30a3f236081c25ae28cf7850c1 Mon Sep 17 00:00:00 2001 From: Tobias Pfeiffer Date: Mon, 14 Apr 2025 21:29:49 +0200 Subject: [PATCH 2/3] bump version to 1.4.0 --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index dcc2f8aa..2dd88480 100644 --- a/mix.exs +++ b/mix.exs @@ -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 [ From 3774af13ba518bbbb6e490572462df7fa1891771 Mon Sep 17 00:00:00 2001 From: Tobias Pfeiffer Date: Mon, 14 Apr 2025 21:44:57 +0200 Subject: [PATCH 3/3] make the pre check sample not fail the samples run --- samples/pre_check.exs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/pre_check.exs b/samples/pre_check.exs index 75432b33..673d3bac 100644 --- a/samples/pre_check.exs +++ b/samples/pre_check.exs @@ -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 +# )