| 1 | # Changelog |
| 2 | |
| 3 | All notable changes to this project will be documented in this file. |
| 4 | |
| 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) |
| 6 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). |
| 7 | |
| 8 | ## [Unreleased] |
| 9 | |
| 10 | ## [0.7.0] - 2025-07-25 |
| 11 | - Bump version of criterion-plot to align dependencies. |
| 12 | |
| 13 | ## [0.6.0] - 2025-05-17 |
| 14 | |
| 15 | ### Changed |
| 16 | - MSRV bumped to 1.80 |
| 17 | - The `real_blackbox` feature no longer has any impact. Criterion always uses `std::hint::black_box()` now. |
| 18 | Users of `criterion::black_box()` should switch to `std::hint::black_box()`. |
| 19 | - `clap` dependency unpinned. |
| 20 | |
| 21 | ### Fixed |
| 22 | - gnuplot version is now correctly detected when using certain Windows binaries/configurations that used to fail |
| 23 | |
| 24 | ### Added |
| 25 | - Async benchmarking with Tokio may be done via a `tokio::runtime::Handle`, not only a `tokio::runtime::Runtime` |
| 26 | |
| 27 | ## [0.5.1] - 2023-05-26 |
| 28 | |
| 29 | ### Fixed |
| 30 | - Quick mode (--quick) no longer crashes with measured times over 5 seconds when --noplot is not active |
| 31 | |
| 32 | ## [0.5.0] - 2023-05-23 |
| 33 | |
| 34 | ### Changed |
| 35 | - Replaced lazy_static dependency with once_cell |
| 36 | - Improved documentation of the `html_reports` feature |
| 37 | - Replaced atty dependency with is-terminal |
| 38 | - MSRV bumped to 1.64 |
| 39 | - Upgraded clap dependency to v4 |
| 40 | - Upgraded tempfile dependency to v3.5.0 |
| 41 | |
| 42 | ### Fixed |
| 43 | - Quick mode (`--quick`) no longer outputs 1ms for measured times over 5 seconds |
| 44 | - Documentation updates |
| 45 | |
| 46 | ## [0.4.0] - 2022-09-10 |
| 47 | |
| 48 | ### Removed |
| 49 | |
| 50 | - The `Criterion::can_plot` function has been removed. |
| 51 | - The `Criterion::bench_function_over_inputs` function has been removed. |
| 52 | - The `Criterion::bench_functions` function has been removed. |
| 53 | - The `Criterion::bench` function has been removed. |
| 54 | |
| 55 | ### Changed |
| 56 | |
| 57 | - HTML report hidden behind non-default feature flag: 'html_reports' |
| 58 | - Standalone support (ie without cargo-criterion) feature flag: 'cargo_bench_support' |
| 59 | - MSRV bumped to 1.57 |
| 60 | - `rayon` and `plotters` are optional (and default) dependencies. |
| 61 | - Status messages ('warming up', 'analyzing', etc) are printed to stderr, benchmark results are printed to stdout. |
| 62 | - Accept subsecond durations for `--warm-up-time`, `--measurement-time` and `--profile-time`. |
| 63 | - Replaced serde_cbor with ciborium because the former is no longer maintained. |
| 64 | - Upgrade clap to v3 and regex to v1.5. |
| 65 | |
| 66 | ### Added |
| 67 | |
| 68 | - A `--discard-baseline` flag for discarding rather than saving benchmark results. |
| 69 | - Formal support for benchmarking code compiled to web-assembly. |
| 70 | - A `--quiet` flag for printing just a single line per benchmark. |
| 71 | - A `Throughput::BytesDecimal` option for measuring throughput in bytes but printing them using |
| 72 | decimal units like kilobytes instead of binary units like kibibytes. |
| 73 | |
| 74 | ### Fixed |
| 75 | - When using `bench_with_input`, the input parameter will now be passed through `black_box` before |
| 76 | passing it to the benchmark. |
| 77 | |
| 78 | ## [0.3.6] - 2022-07-06 |
| 79 | ### Changed |
| 80 | - MSRV bumped to 1.49 |
| 81 | - Symbol for microseconds changed from ASCII 'us' to unicode 'µs' |
| 82 | - Documentation fixes |
| 83 | - Clippy fixes |
| 84 | |
| 85 | ## [0.3.5] - 2021-07-26 |
| 86 | |
| 87 | ### Fixed |
| 88 | |
| 89 | - Corrected `Criterion.toml` in the book. |
| 90 | - Corrected configuration typo in the book. |
| 91 | |
| 92 | ### Changed |
| 93 | |
| 94 | - Bump plotters dependency to always include a bug-fix. |
| 95 | - MSRV bumped to 1.46. |
| 96 | |
| 97 | ## [0.3.4] - 2021-01-24 |
| 98 | |
| 99 | ### Added |
| 100 | |
| 101 | - Added support for benchmarking async functions |
| 102 | - Added `with_output_color` for enabling or disabling CLI output coloring programmatically. |
| 103 | |
| 104 | ### Fixed |
| 105 | |
| 106 | - Criterion.rs will now give a clear error message in case of benchmarks that take zero time. |
| 107 | - Added some extra code to ensure that every sample has at least one iteration. |
| 108 | - Added a notice to the `--help` output regarding "unrecognized option" errors. |
| 109 | - Increased opacity on violin charts. |
| 110 | - Fixed violin chart X axis not starting at zero in the plotters backend. |
| 111 | - Criterion.rs will now automatically detect the right output directory. |
| 112 | |
| 113 | ### Deprecated |
| 114 | |
| 115 | - `Criterion::can_plot` is no longer useful and is deprecated pending deletion in 0.4.0. |
| 116 | - `Benchmark` and `ParameterizedBenchmark` were already hidden from documentation, but are now |
| 117 | formally deprecated pending deletion in 0.4.0. Callers should use `BenchmarkGroup` instead. |
| 118 | - `Criterion::bench_function_over_inputs`, `Criterion::bench_functions`, and `Criterion::bench` were |
| 119 | already hidden from documentation, but are now formally deprecated pending deletion in 0.4.0. |
| 120 | Callers should use `BenchmarkGroup` instead. |
| 121 | - Three new optional features have been added; "html_reports", "csv_output" and |
| 122 | "cargo_bench_support". These features currently do nothing except disable a warning message at |
| 123 | runtime, but in version 0.4.0 they will be used to enable HTML report generation, CSV file |
| 124 | generation, and the ability to run in cargo-bench (as opposed to [cargo-criterion]). |
| 125 | "cargo_bench_support" is enabled by default, but "html_reports" and "csv_output" |
| 126 | are not. If you use Criterion.rs' HTML reports, it is recommended to switch to [cargo-criterion]. |
| 127 | If you use CSV output, it is recommended to switch to [cargo-criterion] and use the |
| 128 | `--message-format=json` option for machine-readable output instead. A warning message will be |
| 129 | printed at the start of benchmark runs which do not have "html_reports" or "cargo_bench_support" |
| 130 | enabled, but because CSV output is not widely used it has no warning. |
| 131 | |
| 132 | [cargo-criterion]: https://github.com/bheisler/cargo-criterion |
| 133 | |
| 134 | ## [0.3.3] - 2020-06-29 |
| 135 | |
| 136 | ### Added |
| 137 | |
| 138 | - Added `CRITERION_HOME` environment variable to set the directory for Criterion to store |
| 139 | its results and charts in. |
| 140 | - Added support for [cargo-criterion]. The long-term goal here is to remove code from Criterion-rs |
| 141 | itself to improve compile times, as well as to add features to `cargo-criterion` that are |
| 142 | difficult to implement in Criterion-rs. |
| 143 | - Add sampling mode option for benchmarks. This allows the user to change how Criterion.rs chooses |
| 144 | the iteration counts in each sample. By default, nothing will change for most benchmarks, but |
| 145 | very slow benchmarks will now run fewer iterations to fit in the desired number of samples. |
| 146 | This affects the statistics and plots generated. |
| 147 | |
| 148 | ### Changed |
| 149 | |
| 150 | - The serialization format for some of the files has changed. This may cause your first benchmark |
| 151 | run after updating to produce errors, but they're harmless and will go away after running the |
| 152 | benchmarks once. |
| 153 | |
| 154 | ### Fixed |
| 155 | |
| 156 | - Fixed a bug where the current measurement was not shown on the relative regression plot. |
| 157 | - Fixed rare panic in the plotters backend. |
| 158 | - Panic with a clear error message (rather than panicking messily later on) when the user sets the |
| 159 | group or function name to the empty string. |
| 160 | - Escape single quotes in benchmark names when generating Gnuplot scripts. |
| 161 | |
| 162 | ## [0.3.2] - 2020-04-26 |
| 163 | |
| 164 | ### Added |
| 165 | |
| 166 | - Added `?Sized` bound to benchmark parameter types, which allows dynamically sized types like |
| 167 | `&str` and `&[T]` to be used as benchmark parameters. |
| 168 | - Added the `--output-format <format>` command-line option. If `--output-format bencher` is passed, |
| 169 | Criterion.rs will print its measurements in a format similar to that used by the `bencher` crate |
| 170 | or unstable `libtest` benchmarks, and using similar statistical measurements as well. Though this |
| 171 | provides less information than the default format, it may be useful for supporting tools which |
| 172 | parse this output format. |
| 173 | - Added `--nocapture` argument. This argument does nothing, but prevents Criterion.rs from exiting |
| 174 | when running tests or benchmarks and allowing stdout output from other tests. |
| 175 | |
| 176 | ### Fixed |
| 177 | |
| 178 | - Fixed panic when environment variables contains non-UTF8 characters. |
| 179 | - Fixed panic when `CRITERION_DEBUG` or `CRITERION_TARGET_DIR` environment variables contain |
| 180 | non-UTF8 characters. |
| 181 | |
| 182 | ## [0.3.1] - 2020-01-25 |
| 183 | |
| 184 | ### Added |
| 185 | |
| 186 | - Added new plotting backend using the `plotters` crate. Implementation generously provided by Hao |
| 187 | Hou, author of the `plotters` crate. |
| 188 | - Added `--plotting-backend` command-line option to select the plotting backend. The existing |
| 189 | gnuplot backend will be used by default when available, and the plotters backend will be used when |
| 190 | gnuplot is not available or when requested. |
| 191 | - Added `Criterion::plotting_backend()` function to configure the plotting backend in code. |
| 192 | - Added `--load-baseline` command-line option to load a baseline for comparison |
| 193 | rather than measuring the current code |
| 194 | - Benchmark filters can now be regular expressions. |
| 195 | |
| 196 | ### Fixed |
| 197 | |
| 198 | - Fixed `fibonacci` functions. |
| 199 | - Fixed `#[criterion]` benchmarks ignoring the command-line options. |
| 200 | - Fixed incorrect scaling of the violin plots. |
| 201 | - Don't print the recommended sample count if it's the same as the configured |
| 202 | sample count. |
| 203 | - Fix potential panic when `nresamples` is set too low. Also added a warning |
| 204 | against setting `nresamples` too low. |
| 205 | - Fixed issue where a slow outer closure would cause Criterion.rs to calculate |
| 206 | the wrong estimated time and number of iterations in the warm-up phase. |
| 207 | |
| 208 | ## [0.3.0] - 2019-08-25 |
| 209 | |
| 210 | ### Added |
| 211 | |
| 212 | - Added support for plugging in custom measurements (eg. processor counters) |
| 213 | into Criterion.rs' measurement and analysis. |
| 214 | - Added support for plugging in instrumentation for internal profilers such as |
| 215 | `cpuprofiler` which must be explicitly started and stopped within the profiled |
| 216 | process. |
| 217 | - Added the `BenchmarkGroup` type, which supersedes `ParameterizedBenchmark`, `Benchmark`, |
| 218 | `Criterion::bench_functions`, `Criterion::bench_function_over_inputs`, and `Criterion::bench`. |
| 219 | `BenchmarkGroup` performs the same function as all of the above, but is cleaner to use and more |
| 220 | powerful and flexible. All of these types/functions are now soft-deprecated (meaning they're |
| 221 | hidden from the documentation and should not be used in new code). They will be fully deprecated |
| 222 | at some point in the 0.3.\* series and removed in 0.4.0. |
| 223 | - `iter_custom` - a "timing loop" that allows the caller to perform their own measurements. This is |
| 224 | useful for complex measurements that don't fit into the usual mode of calling a lambda in a loop. |
| 225 | - If the benchmark cannot be completed in approximately the requested measurement time, |
| 226 | Criterion.rs will now print a suggested measurement time and sample size that would work. |
| 227 | - Two new fields, `throughput_num` and `throughput_type` have been added to the `raw.csv` file. |
| 228 | - Added command-line options to set the defaults for warm-up time, measurement-time, etc. |
| 229 | |
| 230 | ### Changed |
| 231 | |
| 232 | - The `raw.csv` file format has been changed slightly. The `sample_time_nanos` field has been split |
| 233 | into `sample_measured_value` and `unit` fields to accommodate custom measurements. |
| 234 | - Throughput has been expanded from u32 to u64 to accommodate very large input sizes. |
| 235 | |
| 236 | ### Fixed |
| 237 | |
| 238 | - Fixed possible invalid file name error on Windows |
| 239 | - Fixed potential case where data for two different benchmarks would be stored in the same directory. |
| 240 | |
| 241 | ### Removed |
| 242 | |
| 243 | - Removed the `--measure-only` command-line argument; it was deprecated in favor of `--profile-time` |
| 244 | in 0.2.6. |
| 245 | - External program benchmarks have been removed; they were deprecated in 0.2.6. The new |
| 246 | `iter_custom` timing loop can be used as a substitute; see `benches/external_process.rs` for an |
| 247 | example of this. |
| 248 | |
| 249 | ### Deprecated |
| 250 | |
| 251 | - The `--test` argument is now deprecated. To test benchmarks, use `cargo test --benches`. |
| 252 | |
| 253 | ## [0.2.11] - 2019-04-08 |
| 254 | |
| 255 | ### Added |
| 256 | |
| 257 | - Enabled automatic text-coloring on Windows. |
| 258 | |
| 259 | ### Fixed |
| 260 | |
| 261 | - Fixed panic caused by outdated files after benchmark names or types were changed. |
| 262 | - Reduced timing overhead of `Criterion::iter_batched/iter_batched_ref`. |
| 263 | |
| 264 | ## [0.2.10] - 2019-02-09 |
| 265 | |
| 266 | ### Added |
| 267 | |
| 268 | - Added `iter_batched/iter_batched_ref` timing loops, which allow for setup (like |
| 269 | `iter_with_setup/iter_with_large_setup`) and exclude drop (like `iter_with_large_drop`) but |
| 270 | measure the runtime more accurately, use less memory and are more flexible. |
| 271 | |
| 272 | ### Deprecated |
| 273 | |
| 274 | - `iter_with_setup/iter_with_large_setup` are now deprecated in favor of `iter_batched`. |
| 275 | |
| 276 | ## [0.2.9] - 2019-01-24 |
| 277 | |
| 278 | ### Changed |
| 279 | |
| 280 | - Criterion.rs no longer depends on the default features of the `rand-core` crate. This fixes some |
| 281 | downstream crates which use `rand` in a `no_std` context. |
| 282 | |
| 283 | ## [0.2.8] - 2019-01-20 |
| 284 | |
| 285 | ### Changed |
| 286 | |
| 287 | - Criterion.rs now uses `rayon` internally instead of manual `unsafe` code built with thread-scoped. |
| 288 | - Replaced handlebars templates with [TinyTemplate](https://github.com/bheisler/TinyTemplate) |
| 289 | - Merged `criterion-stats` crate into `criterion` crate. `criterion-stats` will no longer receive |
| 290 | updates. |
| 291 | - Replaced or removed various other dependencies to reduce the size of Criterion.rs' dependency |
| 292 | tree. |
| 293 | |
| 294 | ## [0.2.7] - 2018-12-29 |
| 295 | |
| 296 | ### Fixed |
| 297 | |
| 298 | - Fixed version numbers to prevent incompatibilities between `criterion` and `criterion-stats` |
| 299 | crates. |
| 300 | |
| 301 | ## [0.2.6] - 2018-12-27 - Yanked |
| 302 | |
| 303 | ### Added |
| 304 | |
| 305 | - Added `--list` command line option, which lists the benchmarks but does not run them, to match |
| 306 | `cargo test -- --list`. |
| 307 | - Added README/CONTRIBUTING/LICENSE files to sub-crates. |
| 308 | - Displays change in throughput in the command-line and HTML output as well as change in iteration |
| 309 | time. |
| 310 | - Benchmarks with multiple functions and multiple values will now generate a per-value summary |
| 311 | report file in addition to the existing per-function one. |
| 312 | - Added a `--profile-time` command-line argument which disables reporting and analysis and instead |
| 313 | simply iterates each benchmark for approximately the given number of seconds. This supersedes the |
| 314 | (now-deprecated) `--measure-only` argument. |
| 315 | |
| 316 | ### Fixed |
| 317 | |
| 318 | - Functions passed to `Bencher::iter_with_large_setup` can now return output. This is necessary to |
| 319 | prevent the compiler from optimizing away the benchmark. This is technically a breaking change - |
| 320 | that function requires a new type parameter. It's so unlikely to break existing code that I |
| 321 | decided not to delay this for a breaking-change release. |
| 322 | - Reduced measurement overhead for the `iter_with_large_setup` and `iter_with_drop` methods. |
| 323 | - `criterion_group` and `criterion_main` macros no longer require the `Criterion` struct to be |
| 324 | explicitly imported. |
| 325 | - Don't panic when `gnuplot --version` fails. |
| 326 | - Criterion.rs macros no longer require user to `use criterion::Criterion;` |
| 327 | - Criterion.rs no longer initializes a logger, meaning that it will no longer conflict with user |
| 328 | code which does. |
| 329 | - Criterion.rs no longer fails to parse gnuplot version numbers like |
| 330 | `gnuplot 5.2 patchlevel 5a (Gentoo revision r0)` |
| 331 | - Criterion.rs no longer prints an error message that gnuplot couldn't be found when chart |
| 332 | generation is disabled (either by `Criterion::without_plots`, `--noplot` or disabling the |
| 333 | HTML reports feature) |
| 334 | - Benchmark names are now automatically truncated to 100 characters and a number may be added to |
| 335 | make them unique. This fixes a problem where gnuplot would crash if the title was extremely long, |
| 336 | and also improves the general usability of Criterion.rs. |
| 337 | |
| 338 | ### Changed |
| 339 | |
| 340 | - Changed timing model of `iter_with_large_setup` to exclude time spent dropping values returned |
| 341 | by the routine. Time measurements taken with 0.2.6 using these methods may differ from those taken |
| 342 | with 0.2.5. |
| 343 | - Benchmarks with multiple functions and multiple values will now appear as a table rather than a |
| 344 | tree in the benchmark index. This is to accommodate the new per-value summary reports. |
| 345 | |
| 346 | ### Deprecated |
| 347 | |
| 348 | - Deprecated the `--measure-only` command-line-argument in favor of `--profile-time`. This will be |
| 349 | removed in 0.3.0. |
| 350 | - External-program benchmarks are now deprecated. They will be removed in 0.3.0. |
| 351 | - The `html_reports` cargo feature is now deprecated. This feature will become non-optional in 0.3.0. |
| 352 | - Sample sizes less than 10 are deprecated and will be disallowed in 0.3.0. |
| 353 | - This is not an exhaustive list - the full scope of changes in 0.3.0 is not yet determined. There |
| 354 | may be breaking changes that are not listed here. |
| 355 | |
| 356 | ## [0.2.5] - 2018-08-27 |
| 357 | |
| 358 | ### Fixed |
| 359 | |
| 360 | - Fixed links from generated report files to documentation. |
| 361 | - Fixed formatting for very large percentage changes (>1000%) |
| 362 | - Sorted the benchmarks in the index report by name |
| 363 | - Fixed case where benchmark ID with special characters would cause Criterion.rs to open the wrong |
| 364 | file and log an error message. |
| 365 | - Fixed case where running `cargo clean; cargo bench -- <filter>` would cause Criterion.rs to log |
| 366 | an error message. |
| 367 | - Fixed a GNUplot error message when sample size is very small. |
| 368 | - Fixed several cases where Criterion.rs would generate invalid path names. |
| 369 | - Fixed a bug where Criterion.rs would print an error if run with a filter that allowed no benchmarks and a clean target directory. |
| 370 | - Fixed bug where some benchmarks didn't appear in the benchmark index report. |
| 371 | - Criterion.rs now honors the `CARGO_TARGET_DIR` environment variable. |
| 372 | |
| 373 | ### Added |
| 374 | |
| 375 | - Criterion.rs will generate a chart showing the effects of changes in input (or input size) for all |
| 376 | benchmarks with numeric inputs or throughput, not just for those which compare multiple functions. |
| 377 | |
| 378 | ## [0.2.4] 2018-07-08 |
| 379 | |
| 380 | ### Added |
| 381 | |
| 382 | - Added a pair of flags, `--save-baseline` and `--baseline`, which change |
| 383 | how benchmark results are stored and compared. This is useful for |
| 384 | working against a fixed baseline(eg. comparing progress on an |
| 385 | optimization feature branch to the commit it forked from). |
| 386 | Default behavior of Criterion.rs is now `--save-baseline base` |
| 387 | which emulates the previous, user facing behavior. |
| 388 | - `--save-baseline` saves the benchmark results under the provided name. |
| 389 | - `--baseline` compares the results to a saved baseline. |
| 390 | If the baseline does not exist for a benchmark, an error is given. |
| 391 | - Added user-guide documentation for baselines, throughput measurements and |
| 392 | plot configuration. |
| 393 | - Added a flag, `--test`, which causes Criterion to execute the benchmarks once |
| 394 | without measuring or reporting the results. This is useful for checking that the |
| 395 | benchmarks run successfully in a CI setting. |
| 396 | - Added a `raw.csv` file to the output which contains a stable, machine-readable |
| 397 | representation of the measurements taken by benchmarks. This enables users to |
| 398 | perform their own analysis or keep historical information without depending on |
| 399 | private implementation details. |
| 400 | |
| 401 | ### Fixed |
| 402 | |
| 403 | - The `sample_size` method on the `Criterion`, `Benchmark` and |
| 404 | `ParameterizedBenchmark` structs has been changed to panic if the sample size |
| 405 | is less than 2. Other parts of the code require this and will panic if the |
| 406 | sample size is 1, so this is not considered to be a breaking change. |
| 407 | - API documentation has been updated to show more-complete examples. |
| 408 | - Certain characters will now be replaced with underscores when creating benchmark |
| 409 | directory paths, to avoid generating invalid or unexpected paths. |
| 410 | |
| 411 | ## [0.2.3] - 2018-04-14 |
| 412 | |
| 413 | ### Fixed |
| 414 | |
| 415 | - Criterion.rs will now panic with a clear error message if the user attempts to run |
| 416 | a benchmark which doesn't call the `Bencher::iter` function or a related function, |
| 417 | rather than failing in an uncontrolled manner later. |
| 418 | - Fixed broken links in some more summary reports. |
| 419 | |
| 420 | ### Added |
| 421 | |
| 422 | - Added a `--measure-only` argument which causes the benchmark executable to run the |
| 423 | warmup and measurement and then move on to the next benchmark without analyzing or |
| 424 | saving data. This is useful to prevent Criterion.rs' analysis code from appearing |
| 425 | in profile data when profiling benchmarks. |
| 426 | - Added an index report file at "target/criterion/report/index.html" which links to |
| 427 | the other reports for easy navigation. |
| 428 | |
| 429 | ## [0.2.2] - 2018-03-25 |
| 430 | |
| 431 | ### Fixed |
| 432 | |
| 433 | - Fixed broken links in some summary reports. |
| 434 | - Work around apparent rustc bug in >= 1.24.0. |
| 435 | |
| 436 | ## [0.2.1] - 2018-02-24 |
| 437 | |
| 438 | ### Added |
| 439 | |
| 440 | - HTML reports are now a default Cargo feature. If you wish to disable HTML reports, |
| 441 | disable Criterion.rs' default features. Doing so will allow compatibility with |
| 442 | older Rust versions such as 1.20. If you wish to continue using HTML reports, you |
| 443 | don't need to do anything. |
| 444 | - Added a summary report for benchmarks that compare multiple functions or different |
| 445 | inputs. |
| 446 | |
| 447 | ### Changed |
| 448 | |
| 449 | - The plots and HTML reports are now generated in a `report` folder. |
| 450 | |
| 451 | ### Fixed |
| 452 | |
| 453 | - Underscores in benchmark names will no longer cause subscripted characters to |
| 454 | appear in generated plots. |
| 455 | |
| 456 | ## [0.2.0] - 2018-02-05 |
| 457 | |
| 458 | ### Added |
| 459 | |
| 460 | - Added `Criterion.bench` function, which accepts either a `Benchmark` or |
| 461 | `ParameterizedBenchmark`. These new structures allow for custom per-benchmark |
| 462 | configuration as well as more complex benchmark grouping (eg. comparing a Rust |
| 463 | function against an external program over a range of inputs) which was not |
| 464 | possible previously. |
| 465 | - Criterion.rs can now report the throughput of the benchmarked code in units of |
| 466 | bytes or elements per second. See the `Benchmark.throughput` and |
| 467 | `ParameterizedBenchmark.throughput` functions for further details. |
| 468 | - Criterion.rs now generates a basic HTML report for each benchmark. |
| 469 | - Added `--noplot` command line option to disable plot generation. |
| 470 | |
| 471 | ### Changed |
| 472 | |
| 473 | - The builder methods on the Criterion struct now take and return self by value |
| 474 | for easier chaining. Functions which configure a Criterion structure will need |
| 475 | to be updated accordingly, or will need to be changed to work with the |
| 476 | `Benchmark` or `ParameterizedBenchmark` types to do per-benchmark configuration |
| 477 | instead. |
| 478 | - The closures taken by `Criterion.bench_*` must now have a `'static` lifetime. |
| 479 | This means that you may need to change your closures from `|bencher| {...}` |
| 480 | to `move |bencher| {...}`. |
| 481 | - `Criterion.bench_functions` now takes `I` as an input parameter, not `&I`. |
| 482 | - Input values must now implement `Debug` rather than `Display`. |
| 483 | - The generated plots are stored in `target/criterion` rather than `.criterion`. |
| 484 | |
| 485 | ### Removed |
| 486 | |
| 487 | - The hidden `criterion::ConfidenceInterval` and`criterion::Estimate` types are |
| 488 | no longer publicly accessible. |
| 489 | - The `Criterion.summarize` function has been removed. |
| 490 | |
| 491 | ### Fixed |
| 492 | |
| 493 | - Fixed the relative mean and median reports. |
| 494 | - Fixed panic while summarizing benchmarks. |
| 495 | |
| 496 | ## [0.1.2] - 2018-01-12 |
| 497 | |
| 498 | ### Changed |
| 499 | |
| 500 | - Criterion.rs is now stable-compatible! |
| 501 | - Criterion.rs now includes its own stable-compatible `black_box` function. |
| 502 | Some benchmarks may now be affected by dead-code-elimination where they |
| 503 | previously weren't and may have to be updated. |
| 504 | - Criterion.rs now uses `serde` to save results. Existing results files will |
| 505 | be automatically removed when benchmarks are run. |
| 506 | - Redesigned the command-line output to highlight the important information |
| 507 | and reduce noise. |
| 508 | |
| 509 | ### Added |
| 510 | |
| 511 | - Running benchmarks with the variable "CRITERION_DEBUG" in the environment will |
| 512 | cause Criterion.rs to generate extra debug output and save the gnuplot scripts |
| 513 | alongside the generated plots. |
| 514 | |
| 515 | ### Fixed |
| 516 | |
| 517 | - Don't panic on IO errors or gnuplot failures |
| 518 | - Fix generation of invalid gnuplot scripts when benchmarking over inputs and inputs include values <= 0. |
| 519 | - Bug where benchmarks would run one sample fewer than was configured. |
| 520 | |
| 521 | ### Removed |
| 522 | |
| 523 | - Generated plots will no longer use log-scale. |
| 524 | |
| 525 | ## [0.1.1] - 2017-12-12 |
| 526 | |
| 527 | ### Added |
| 528 | |
| 529 | - A changelog file. |
| 530 | - Added a chapter to the book on how Criterion.rs collects and analyzes data. |
| 531 | - Added macro rules to generate a test harness for use with `cargo bench`. |
| 532 | Benchmarks defined without these macros should continue to work. |
| 533 | - New contribution guidelines |
| 534 | - Criterion.rs can selectively run benchmarks. See the Command-line page for |
| 535 | more details |
| 536 | |
| 537 | ## 0.1.0 - 2017-12-02 |
| 538 | |
| 539 | ### Added |
| 540 | |
| 541 | - Initial release on Crates.io. |
| 542 | |
| 543 | [Unreleased]: https://github.com/bheisler/criterion.rs/compare/0.4.0...HEAD |
| 544 | [0.1.1]: https://github.com/bheisler/criterion.rs/compare/0.1.0...0.1.1 |
| 545 | [0.1.2]: https://github.com/bheisler/criterion.rs/compare/0.1.1...0.1.2 |
| 546 | [0.2.0]: https://github.com/bheisler/criterion.rs/compare/0.1.2...0.2.0 |
| 547 | [0.2.1]: https://github.com/bheisler/criterion.rs/compare/0.2.0...0.2.1 |
| 548 | [0.2.2]: https://github.com/bheisler/criterion.rs/compare/0.2.1...0.2.2 |
| 549 | [0.2.3]: https://github.com/bheisler/criterion.rs/compare/0.2.2...0.2.3 |
| 550 | [0.2.4]: https://github.com/bheisler/criterion.rs/compare/0.2.3...0.2.4 |
| 551 | [0.2.5]: https://github.com/bheisler/criterion.rs/compare/0.2.4...0.2.5 |
| 552 | [0.2.6]: https://github.com/bheisler/criterion.rs/compare/0.2.5...0.2.6 |
| 553 | [0.2.7]: https://github.com/bheisler/criterion.rs/compare/0.2.6...0.2.7 |
| 554 | [0.2.8]: https://github.com/bheisler/criterion.rs/compare/0.2.7...0.2.8 |
| 555 | [0.2.9]: https://github.com/bheisler/criterion.rs/compare/0.2.8...0.2.9 |
| 556 | [0.2.10]: https://github.com/bheisler/criterion.rs/compare/0.2.9...0.2.10 |
| 557 | [0.2.11]: https://github.com/bheisler/criterion.rs/compare/0.2.10...0.2.11 |
| 558 | [0.3.0]: https://github.com/bheisler/criterion.rs/compare/0.2.11...0.3.0 |
| 559 | [0.3.1]: https://github.com/bheisler/criterion.rs/compare/0.3.0...0.3.1 |
| 560 | [0.3.2]: https://github.com/bheisler/criterion.rs/compare/0.3.1...0.3.2 |
| 561 | [0.3.3]: https://github.com/bheisler/criterion.rs/compare/0.3.2...0.3.3 |
| 562 | [0.3.4]: https://github.com/bheisler/criterion.rs/compare/0.3.3...0.3.4 |
| 563 | [0.3.5]: https://github.com/bheisler/criterion.rs/compare/0.3.4...0.3.5 |
| 564 | [0.3.6]: https://github.com/bheisler/criterion.rs/compare/0.3.5...0.3.6 |
| 565 | [0.4.0]: https://github.com/bheisler/criterion.rs/compare/0.3.6...0.4.0 |
| 566 | [0.5.0]: https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0 |
| 567 | [0.5.1]: https://github.com/bheisler/criterion.rs/compare/0.5.0...0.5.1 |