Skip to content

Commit

Permalink
add codspeed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fogapod committed Mar 3, 2024
1 parent 18b57b9 commit 2a8ad73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ dyn-clone = "1.0"
[dev-dependencies]
ron = { version = "0.8" }
serde_json = { version = "1.0" }
criterion = { version = "0.4", features = ["html_reports"] }
criterion = { version = "0.5", features = ["html_reports"] }
codspeed-criterion-compat = "2.4.0"

[features]
default = ["deserialize"]
Expand Down
4 changes: 2 additions & 2 deletions benches/accents.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use criterion::{criterion_group, criterion_main, Criterion};
use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion};
use sayit::Accent;
use std::fs;

Expand All @@ -23,7 +23,7 @@ fn accents(c: &mut Criterion) {
let lines = read_sample_file_lines();

let mut g = c.benchmark_group("accents");
g.sampling_mode(criterion::SamplingMode::Linear);
g.sampling_mode(codspeed_criterion_compat::SamplingMode::Linear);

for name in [
"original", "literal", "any", "weights", "upper", "lower", "concat",
Expand Down
4 changes: 2 additions & 2 deletions benches/examples.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use criterion::{criterion_group, criterion_main, Criterion};
use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion};
use sayit::Accent;
use std::{fs, path::PathBuf};

Expand All @@ -24,7 +24,7 @@ fn examples(c: &mut Criterion) {
let lines = read_sample_file_lines();

let mut g = c.benchmark_group("examples");
g.sampling_mode(criterion::SamplingMode::Linear);
g.sampling_mode(codspeed_criterion_compat::SamplingMode::Linear);

for entry in fs::read_dir("examples").unwrap() {
let path = entry.unwrap().path();
Expand Down
2 changes: 1 addition & 1 deletion benches/literal_string.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fs;

use criterion::{criterion_group, criterion_main, Criterion, SamplingMode};
use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion, SamplingMode};

use sayit::{tag_impls::literal::PrecomputedLiteral, utils::LiteralString};

Expand Down

0 comments on commit 2a8ad73

Please sign in to comment.