Skip to content

Commit 04ee63b

Browse files
committed
Fix benchmarks
1 parent 86fee18 commit 04ee63b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

benches/eval.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn generate_plugin_versions() -> Vec<(String, String)> {
2323

2424
fn criterion_benchmark(c: &mut Criterion) {
2525
c.bench_function("Expression.eval() file(path)", |b| {
26-
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
26+
let state = State::new(GameType::Oblivion, ".".into());
2727
let expression = Expression::from_str("file(\"Cargo.toml\")").unwrap();
2828

2929
b.iter(|| {
@@ -32,7 +32,7 @@ fn criterion_benchmark(c: &mut Criterion) {
3232
});
3333

3434
c.bench_function("Expression.eval() file(regex)", |b| {
35-
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
35+
let state = State::new(GameType::Oblivion, ".".into());
3636
let expression = Expression::from_str("file(\"Cargo.*\")").unwrap();
3737

3838
b.iter(|| {
@@ -44,7 +44,6 @@ fn criterion_benchmark(c: &mut Criterion) {
4444
let state = State::new(
4545
GameType::Oblivion,
4646
"tests/testing-plugins/Oblivion/Data".into(),
47-
".".into(),
4847
)
4948
.with_active_plugins(&generate_active_plugins());
5049

@@ -59,7 +58,6 @@ fn criterion_benchmark(c: &mut Criterion) {
5958
let state = State::new(
6059
GameType::Oblivion,
6160
"tests/testing-plugins/Oblivion/Data".into(),
62-
".".into(),
6361
)
6462
.with_active_plugins(&generate_active_plugins());
6563

@@ -71,7 +69,7 @@ fn criterion_benchmark(c: &mut Criterion) {
7169
});
7270

7371
c.bench_function("Expression.eval() many()", |b| {
74-
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
72+
let state = State::new(GameType::Oblivion, ".".into());
7573
let expression = Expression::from_str("many(\"Cargo.*\")").unwrap();
7674

7775
b.iter(|| {
@@ -83,7 +81,6 @@ fn criterion_benchmark(c: &mut Criterion) {
8381
let state = State::new(
8482
GameType::Oblivion,
8583
"tests/testing-plugins/Oblivion/Data".into(),
86-
".".into(),
8784
)
8885
.with_active_plugins(&generate_active_plugins());
8986

@@ -98,7 +95,6 @@ fn criterion_benchmark(c: &mut Criterion) {
9895
let state = State::new(
9996
GameType::Oblivion,
10097
"tests/testing-plugins/Oblivion/Data".into(),
101-
".".into(),
10298
);
10399
let expression = Expression::from_str("checksum(\"Blank.esm\", 374E2A6F)").unwrap();
104100

@@ -111,7 +107,6 @@ fn criterion_benchmark(c: &mut Criterion) {
111107
let state = State::new(
112108
GameType::Oblivion,
113109
"tests/testing-plugins/Oblivion/Data".into(),
114-
".".into(),
115110
)
116111
.with_plugin_versions(&generate_plugin_versions());
117112

@@ -123,7 +118,7 @@ fn criterion_benchmark(c: &mut Criterion) {
123118
});
124119

125120
c.bench_function("Expression.eval() version(executable)", |b| {
126-
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
121+
let state = State::new(GameType::Oblivion, ".".into());
127122
let expression =
128123
Expression::from_str("version(\"tests/libloot_win32/loot.dll\", \"0.18.2.0\", ==)")
129124
.unwrap();

0 commit comments

Comments
 (0)