Skip to content

Commit

Permalink
Use logarithmic scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Aug 14, 2024
1 parent ed29439 commit c992f13
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
31 changes: 19 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,25 @@ publish = false
license = "Apache-2.0"

[features]
default = ["askama", "handlebars", "horrorshow", "markup", "maud", "minijinja", "rinja", "ructe", "sailfish", "tera", "tinytemplate"]
askama = ["dep:askama"]
handlebars = ["dep:handlebars"]
horrorshow = ["dep:horrorshow"]
markup = ["dep:markup"]
maud = ["dep:maud"]
minijinja = ["dep:minijinja"]
rinja = ["dep:rinja"]
ructe = ["dep:ructe"]
sailfish = ["dep:sailfish"]
tera = ["dep:tera"]
tinytemplate = ["dep:tinytemplate"]
default = ["compiled", "interpreted"]

compiled = ["askama", "horrorshow", "markup", "maud", "rinja", "ructe", "sailfish"]
interpreted = ["handlebars", "minijinja", "tera", "tinytemplate"]

askama = ["dep:askama", "_contains_compiled"]
handlebars = ["dep:handlebars", "_contains_compiled"]
horrorshow = ["dep:horrorshow", "_contains_interpreted"]
markup = ["dep:markup", "_contains_compiled"]
maud = ["dep:maud", "_contains_compiled"]
minijinja = ["dep:minijinja", "_contains_interpreted"]
rinja = ["dep:rinja", "_contains_compiled"]
ructe = ["dep:ructe", "_contains_compiled"]
sailfish = ["dep:sailfish", "_contains_compiled"]
tera = ["dep:tera", "_contains_interpreted"]
tinytemplate = ["dep:tinytemplate", "_contains_interpreted"]

_contains_compiled = []
_contains_interpreted = []

[dependencies]
tmpls = { version = "*", path = "tmpls" }
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ macro_rules! for_each {
($c:ident, $input:ident : $Input:ident, $func:ident) => {{
let mut group = $c.benchmark_group(stringify!($func));

#[cfg(all(feature = "_contains_compiled", feature = "_contains_interpreted"))]
group.plot_config(criterion::PlotConfiguration::default()
.summary_scale(criterion::AxisScale::Logarithmic));

#[cfg(feature = "askama")]
for_each!(askama, group, $input:$Input, $func);
#[cfg(feature = "handlebars")]
Expand Down

0 comments on commit c992f13

Please sign in to comment.