From 8c1e24eb4734e037813f0f96fdd6e7992efadbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Thu, 11 Apr 2024 14:02:10 +0200 Subject: [PATCH 1/2] fix(Cargo.toml): exclude test images from releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 97d8a628..ce77f2b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ exclude = [ "/img/", "/benches/", "/benches_data/", + "/data", "/.gitattributes", "/.gitignore", "/.gitmodules", From b1b5594e9a6310097fbebf4864f53d1960cbc6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Thu, 11 Apr 2024 14:06:31 +0200 Subject: [PATCH 2/2] fix: unify `benches_data` and `data` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .gitattributes | 1 - .github/workflows/ci.yml | 2 +- Cargo.toml | 1 - benches/complete_binary/mod.rs | 30 ++++++++++++++---------- benches/vm/mod.rs | 2 +- benches_data/hello_world | 3 --- benches_data/rusty-loader | 3 --- {benches_data => data/x86_64}/rusty_demo | 0 8 files changed, 20 insertions(+), 22 deletions(-) delete mode 100755 benches_data/hello_world delete mode 100644 benches_data/rusty-loader rename {benches_data => data/x86_64}/rusty_demo (100%) diff --git a/.gitattributes b/.gitattributes index 51419b8d..a4453821 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d81e14e..05ee5861 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/Cargo.toml b/Cargo.toml index ce77f2b8..49c6694e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ exclude = [ "/.github/", "/img/", "/benches/", - "/benches_data/", "/data", "/.gitattributes", "/.gitignore", diff --git a/benches/complete_binary/mod.rs b/benches/complete_binary/mod.rs index dd8d1411..335e2b42 100644 --- a/benches/complete_binary/mod.rs +++ b/benches/complete_binary/mod.rs @@ -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::(); assert!( @@ -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) @@ -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::(); + let rusty_loader_path = [ + env!("CARGO_MANIFEST_DIR"), + "data/x86_64/hermit-loader-x86_64", + ] + .iter() + .collect::(); 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") @@ -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::(); assert!( @@ -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) @@ -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::(); + let rusty_loader_path = [ + env!("CARGO_MANIFEST_DIR"), + "data/x86_64/hermit-loader-x86_64", + ] + .iter() + .collect::(); 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") diff --git a/benches/vm/mod.rs b/benches/vm/mod.rs index d7f2944c..f27f7cd1 100644 --- a/benches/vm/mod.rs +++ b/benches/vm/mod.rs @@ -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 { diff --git a/benches_data/hello_world b/benches_data/hello_world deleted file mode 100755 index d8761db4..00000000 --- a/benches_data/hello_world +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7540090141d2a723bc15bac4312c0f17d83064e6420bc669702c03407603f99 -size 1830176 diff --git a/benches_data/rusty-loader b/benches_data/rusty-loader deleted file mode 100644 index 85c16d1c..00000000 --- a/benches_data/rusty-loader +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ccf7b3a0fb12e734cda9919d946151c901a7603d039f366675d1e52d2f7681f1 -size 102660 diff --git a/benches_data/rusty_demo b/data/x86_64/rusty_demo similarity index 100% rename from benches_data/rusty_demo rename to data/x86_64/rusty_demo