Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Dec 27, 2024
1 parent 2241482 commit d3c1b50
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gnuplot inkscape scour wkhtmltopdf xvfb
sudo apt-get install -y coreutils gnuplot inkscape retry scour wkhtmltopdf xvfb
- name: Install rust
uses: dtolnay/rust-toolchain@master
Expand All @@ -142,13 +142,13 @@ jobs:

- name: Run benchmarks
# Pin to one CPU, skipping the first core, to hopefully get fewer outliers.
run: taskset --cpu-list "$(( $RANDOM % ($(nproc) - 2) + 2 ))" cargo bench --bench template-benchmark
run: taskset --cpu-list "$(( $RANDOM % ($(nproc) - 2) + 2 ))" cargo bench --bench template-benchmark -- --nocapture

- name: Fixup paths
run: sed -e 's,href="../,href=",' < target/criterion/report/index.html > target/criterion/index.html

- name: Generate table
run: ./generate-table.py
run: timeout 300 retry timeout 30 ./generate-table.py

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ sailfish = { version = "*", optional = true, path = "tmpls/sailfish", package =
tera = { version = "*", optional = true, path = "tmpls/tera", package = "tmpl-tera" }
tinytemplate = { version = "*", optional = true, path = "tmpls/tinytemplate", package = "tmpl-tinytemplate" }

ahash = { version = "0.8.11", features = ["no-rng"] }
criterion = { version = "0.5.1", features = ["html_reports"] }
pretty-error-debug = "0.3.0"
thiserror = "2.0.3"
ahash = { version = "0.8", features = ["no-rng"] }
criterion = { version = "0.5", features = ["html_reports"] }
pretty-error-debug = "0.3"
thiserror = "2"

[build-dependencies]
pretty-error-debug = "0.3.0"
self_cell = "1.0.4"
thiserror = "2.0.3"
pretty-error-debug = "0.3"
self_cell = "1"
thiserror = "2"

[[bench]]
name = "template-benchmark"
Expand Down
20 changes: 18 additions & 2 deletions benches/template-benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
use criterion::{criterion_group, criterion_main};
use std::time::Duration;

use criterion::{Criterion, PlottingBackend, criterion_group, criterion_main};
use template_benchmark::{big_table, teams};

criterion_main!(benches);
criterion_group!(benches, big_table, teams);
criterion_group! {
name = benches;
config = new_criterion();
targets = big_table, teams
}

fn new_criterion() -> Criterion {
Criterion::default()
.sample_size(500)
.confidence_level(0.98)
.significance_level(0.02)
.warm_up_time(Duration::from_secs(5))
.plotting_backend(PlottingBackend::Gnuplot)
.measurement_time(Duration::from_secs(60))
}
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[licenses]
version = 2
allow = ["Apache-2.0", "MIT", "Unicode-DFS-2016"]
allow = ["Apache-2.0", "MIT", "Unicode-3.0"]
private = { ignore = true }

[advisories]
Expand Down
2 changes: 1 addition & 1 deletion tmpls/askama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

askama = "0.12.1"
askama = "0.12"
2 changes: 1 addition & 1 deletion tmpls/handlebars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

handlebars = "6.0.0"
handlebars = "6"
2 changes: 1 addition & 1 deletion tmpls/horrorshow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

horrorshow = "0.8.4"
horrorshow = "0.8"
2 changes: 1 addition & 1 deletion tmpls/markup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

markup = { version = "0.15.0", features = ["itoa"] }
markup = { version = "0.15", features = ["itoa"] }
1 change: 1 addition & 0 deletions tmpls/markup/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use tmpls::{BigTable, Teams};
#[derive(Debug, Default)]
pub struct Benchmark;

#[allow(clippy::needless_lifetimes)] // false-positive
impl tmpls::Benchmark for Benchmark {
type Output = String;
type Error = std::fmt::Error;
Expand Down
3 changes: 1 addition & 2 deletions tmpls/maud/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

maud = "0.26.0"

maud = "0.26"
2 changes: 1 addition & 1 deletion tmpls/minijinja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

minijinja = { version = "2.1.2", default-features = false, features = ["serde", "speedups"] }
minijinja = { version = "2", default-features = false, features = ["serde", "speedups"] }
2 changes: 1 addition & 1 deletion tmpls/rinja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

rinja = "0.3.0"
rinja = "0.3"
2 changes: 1 addition & 1 deletion tmpls/rinja_git/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

rinja = { version = "0.3.0", git = "https://github.com/rinja-rs/rinja", branch = "master" }
rinja = { version = "0.3", git = "https://github.com/rinja-rs/rinja", branch = "master" }
4 changes: 2 additions & 2 deletions tmpls/ructe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

ructe = "0.17.2"
ructe = "0.17"

[build-dependencies]
ructe = "0.17.2"
ructe = "0.17"
2 changes: 2 additions & 0 deletions tmpls/ructe/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::needless_lifetimes)] // false-positive

include!(concat!(env!("OUT_DIR"), "/templates.rs"));

use tmpls::{BigTable, Teams};
Expand Down
2 changes: 1 addition & 1 deletion tmpls/sailfish/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

sailfish = "0.9.0"
sailfish = "0.9"
2 changes: 1 addition & 1 deletion tmpls/tera/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

tera = { version = "1.20.0", default-features = false }
tera = { version = "1", default-features = false }
2 changes: 1 addition & 1 deletion tmpls/tinytemplate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ license = "Apache-2.0"
[dependencies]
tmpls = { version = "*", path = ".." }

tinytemplate = "1.2.1"
tinytemplate = "1"

0 comments on commit d3c1b50

Please sign in to comment.