Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unify benches_data and data #674

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.png filter=lfs diff=lfs merge=lfs -text
benches_data/** filter=lfs diff=lfs merge=lfs -text
data/** filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
timeout-minutes: 1
run: |
cargo run -- -v data/x86_64/hello_world
cargo run -- -v benches_data/rusty_demo
cargo run -- -v data/x86_64/rusty_demo
cargo run -- -v data/x86_64/hello_c

fmt:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exclude = [
"/.github/",
"/img/",
"/benches/",
"/benches_data/",
"/data",
"/.gitattributes",
"/.gitignore",
"/.gitmodules",
Expand Down
30 changes: 18 additions & 12 deletions benches/complete_binary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn run_hello_world(c: &mut Criterion) {
"uhyve release build is required to run this benchmark"
);

let hello_world_path = [env!("CARGO_MANIFEST_DIR"), "benches_data/hello_world"]
let hello_world_path = [env!("CARGO_MANIFEST_DIR"), "data/x86_64/hello_world"]
.iter()
.collect::<PathBuf>();
assert!(
Expand All @@ -42,7 +42,7 @@ pub fn run_hello_world(c: &mut Criterion) {
let mut group = c.benchmark_group("hello_world");
group.sample_size(30);

group.bench_function("uhyve benches_data/hello_world", |b| {
group.bench_function("uhyve data/x86_64/hello_world", |b| {
b.iter(|| {
let status = Command::new(&uhyve_path)
.arg(&hello_world_path)
Expand All @@ -62,15 +62,18 @@ pub fn run_hello_world(c: &mut Criterion) {
return;
}

let rusty_loader_path = [env!("CARGO_MANIFEST_DIR"), "benches_data/rusty-loader"]
.iter()
.collect::<PathBuf>();
let rusty_loader_path = [
env!("CARGO_MANIFEST_DIR"),
"data/x86_64/hermit-loader-x86_64",
]
.iter()
.collect::<PathBuf>();
assert!(
rusty_loader_path.exists(),
"rusty-loader is missing from bench_data"
);

group.bench_function("qemu benches_data/hello_world", |b| {
group.bench_function("qemu data/x86_64/hello_world", |b| {
b.iter(|| {
let status = Command::new("qemu-system-x86_64")
.arg("-smp")
Expand Down Expand Up @@ -105,7 +108,7 @@ pub fn run_rusty_demo(c: &mut Criterion) {
"uhyve release build is required to run this benchmark"
);

let rusty_demo_path = [env!("CARGO_MANIFEST_DIR"), "benches_data/rusty_demo"]
let rusty_demo_path = [env!("CARGO_MANIFEST_DIR"), "data/x86_64/rusty_demo"]
.iter()
.collect::<PathBuf>();
assert!(
Expand All @@ -116,7 +119,7 @@ pub fn run_rusty_demo(c: &mut Criterion) {
let mut group = c.benchmark_group("rusty_demo");
group.measurement_time(Duration::from_secs(60));

group.bench_function("uhyve benches_data/rusty_demo", |b| {
group.bench_function("uhyve data/x86_64/rusty_demo", |b| {
b.iter(|| {
let status = Command::new(&uhyve_path)
.arg(&rusty_demo_path)
Expand All @@ -134,15 +137,18 @@ pub fn run_rusty_demo(c: &mut Criterion) {
return;
}

let rusty_loader_path = [env!("CARGO_MANIFEST_DIR"), "benches_data/rusty-loader"]
.iter()
.collect::<PathBuf>();
let rusty_loader_path = [
env!("CARGO_MANIFEST_DIR"),
"data/x86_64/hermit-loader-x86_64",
]
.iter()
.collect::<PathBuf>();
assert!(
rusty_loader_path.exists(),
"rusty-loader is missing from bench_data"
);

group.bench_function("qemu benches_data/rusty_demo", |b| {
group.bench_function("qemu data/x86_64/rusty_demo", |b| {
b.iter(|| {
let status = Command::new("qemu-system-x86_64")
.arg("-smp")
Expand Down
2 changes: 1 addition & 1 deletion benches/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use uhyvelib::{
};

pub fn load_vm_hello_world(c: &mut Criterion) {
let path = [env!("CARGO_MANIFEST_DIR"), "benches_data/hello_world"]
let path = [env!("CARGO_MANIFEST_DIR"), "data/x86_64/hello_world"]
.iter()
.collect();
let params = Params {
Expand Down
3 changes: 0 additions & 3 deletions benches_data/hello_world

This file was deleted.

3 changes: 0 additions & 3 deletions benches_data/rusty-loader

This file was deleted.

File renamed without changes.
Loading