Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
test: move benchmarking files into tests folder to decrease dependenc…
Browse files Browse the repository at this point in the history
…y size
  • Loading branch information
pedrohba1 committed Feb 15, 2024
1 parent 620839a commit 0db49fb
Show file tree
Hide file tree
Showing 26 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benches/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn bench(c: &mut Criterion) {
group.sample_size(ITERS_PER_FILE);

group.bench_function("handle-flat-file", |b| {
let files = fs::read_dir("benchmark_files").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down
10 changes: 5 additions & 5 deletions benches/stream_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn read_decode_check_bench(c: &mut Criterion) {
group.sample_size(ITERS_PER_FILE);

group.bench_function("read-message-stream", |b| {
let files = fs::read_dir("benchmark_files/pre_merge").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files/pre_merge").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down Expand Up @@ -50,7 +50,7 @@ fn read_decode_check_bench(c: &mut Criterion) {
});

group.bench_function("decode-bstream", |b| {
let files = fs::read_dir("benchmark_files/pre_merge").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files/pre_merge").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down Expand Up @@ -78,7 +78,7 @@ fn read_decode_check_bench(c: &mut Criterion) {
});

group.bench_function("decode-block", |b| {
let files = fs::read_dir("benchmark_files/pre_merge").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files/pre_merge").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down Expand Up @@ -110,7 +110,7 @@ fn read_decode_check_bench(c: &mut Criterion) {
});

group.bench_function("receipts-check", |b| {
let files = fs::read_dir("benchmark_files/pre_merge").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files/pre_merge").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down Expand Up @@ -142,7 +142,7 @@ fn read_decode_check_bench(c: &mut Criterion) {
});

group.bench_function("transactions-check", |b| {
let files = fs::read_dir("benchmark_files/pre_merge").expect("Failed to read dir");
let files = fs::read_dir("tests/benchmark_files/pre_merge").expect("Failed to read dir");
for file in files {
let path = file.expect("Failed to get path").path();
match path.extension() {
Expand Down

0 comments on commit 0db49fb

Please sign in to comment.