[go: up one dir, main page]

criterion 0.8.1

Statistics-driven micro-benchmarking library
Documentation
[workspace]
members = [".", "plot"]
resolver = "2"

[workspace.package]
authors = [
    "Jorge Aparicio <japaricious@gmail.com>",
    "Brook Heisler <brookheisler@gmail.com>",
]
# When bumping:
#
# * Update version numbers in the book;
version = "0.8.1"
edition = "2021"
# Update the MSRV variable in .github/workflows/ci.yml when changing this.
rust-version = "1.86"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/criterion-rs/criterion.rs"
readme = "README.md"

[package]
name = "criterion"
description = "Statistics-driven micro-benchmarking library"
categories = ["development-tools::profiling"]
keywords = ["criterion", "benchmark"]
homepage = "https://criterion-rs.github.io/book/index.html"
authors.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
exclude = ["book/*"]

[dependencies]
alloca = "0.4"
anes = "0.1.4"
criterion-plot = { path = "plot", version = "0.8.1" }
itertools = "0.13"
page_size = "0.6"
serde = { version = "1.0.100", features = ["derive"] }
serde_json = "1.0.100"
ciborium = "0.2.0"
clap = { version = "4.5", default-features = false, features = ["std", "help"] }
walkdir = "2.3"
tinytemplate = "1.1"
cast = "0.3"
num-traits = { version = "0.2", default-features = false, features = ["std"] }
oorandom = "11.1"
regex = { version = "1.5.1", default-features = false, features = ["std"] }

# Optional dependencies
rayon = { version = "1.3", optional = true }
csv = { version = "1.1", optional = true }
futures = { version = "0.3", default-features = false, features = [
    "executor",
], optional = true }
smol = { version = "2.0", default-features = false, optional = true }
tokio = { version = "1.0", default-features = false, features = [
    "rt",
], optional = true }

[dependencies.plotters]
version = "^0.3.2"
optional = true
default-features = false
features = ["svg_backend", "area_series", "line_series"]

[dev-dependencies]
tempfile = "3.5.0"
approx = "0.5.0"
quickcheck = { version = "1.0", default-features = false }
rand = "0.8"
futures = "0.3"

[features]
stable = [
    "csv_output",
    "html_reports",
    "async_futures",
    "async_smol",
    "async_tokio",
]
default = ["rayon", "plotters", "cargo_bench_support"]

# This is a legacy feature that no longer does anything, but removing it would be a semver break.
real_blackbox = []

# Enable rayon support
rayon = ["dep:rayon"]

# Enable plotters support
plotters = ["dep:plotters"]

# Enable async/await support
async = []

# These features enable built-in support for running async benchmarks on each different async
# runtime.
async_futures = ["dep:futures", "async"]
async_smol = ["dep:smol", "async"]
async_tokio = ["dep:tokio", "async"]

# Make Criterion.rs generate its own plots (as opposed to using cargo-criterion)
html_reports = []

# Make Criterion.rs usable outside of cargo-criterion.
cargo_bench_support = []

# Make Criterion.rs generate CSV files. This feature is deprecated in favor of
# cargo-criterion's --message-format=json option.
csv_output = ["dep:csv"]

[[bench]]
name = "bench_main"
harness = false

[lib]
bench = false

# Enable all of the async runtimes for the docs.rs output
[package.metadata.docs.rs]
features = ["async_futures", "async_smol", "async_tokio"]