Renamed the 'tests' module to 'benchmarks' to better reflect what's in that module
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
d967fc0920
commit
983b1cbeef
18
src/main.rs
18
src/main.rs
@ -1,4 +1,4 @@
|
|||||||
mod tests;
|
mod benchmarks;
|
||||||
mod text;
|
mod text;
|
||||||
|
|
||||||
use clap::{Args, Parser, Subcommand};
|
use clap::{Args, Parser, Subcommand};
|
||||||
@ -16,10 +16,10 @@ struct Cli {
|
|||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
enum Commands {
|
enum Commands {
|
||||||
// disk tests subcommand
|
// disk benchmarks subcommand
|
||||||
#[clap(name = "disk", about = "Hard drive and SSD benchmarks.")]
|
#[clap(name = "disk", about = "Hard drive and SSD benchmarks.")]
|
||||||
Disk(Disk),
|
Disk(Disk),
|
||||||
// network tests subcommand
|
// network benchmarks subcommand
|
||||||
#[clap(name = "network", about = "Test various aspects of your network.")]
|
#[clap(name = "network", about = "Test various aspects of your network.")]
|
||||||
Net(Net),
|
Net(Net),
|
||||||
}
|
}
|
||||||
@ -105,25 +105,25 @@ fn main() {
|
|||||||
DiskCommands::ReadSeqTest { tempfile, size } => {
|
DiskCommands::ReadSeqTest { tempfile, size } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::disk::disk_read_seq_test(tempfile, size);
|
benchmarks::disk::disk_read_seq_test(tempfile, size);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DiskCommands::ReadRandTest { tempfile, size } => {
|
DiskCommands::ReadRandTest { tempfile, size } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::disk::disk_read_rand_test(tempfile, size);
|
benchmarks::disk::disk_read_rand_test(tempfile, size);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DiskCommands::WriteSeqTest { tempfile, size } => {
|
DiskCommands::WriteSeqTest { tempfile, size } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::disk::disk_write_seq_test(tempfile, size);
|
benchmarks::disk::disk_write_seq_test(tempfile, size);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DiskCommands::WriteRandTest { tempfile, size } => {
|
DiskCommands::WriteRandTest { tempfile, size } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::disk::disk_write_rand_test(tempfile, size);
|
benchmarks::disk::disk_write_rand_test(tempfile, size);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -132,13 +132,13 @@ fn main() {
|
|||||||
NetCommands::Ping { host, count } => {
|
NetCommands::Ping { host, count } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::network::ping_host(host, count);
|
benchmarks::network::ping_host(host, count);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
NetCommands::Bandwidth { download, output } => {
|
NetCommands::Bandwidth { download, output } => {
|
||||||
for i in 0..cli.loopcount {
|
for i in 0..cli.loopcount {
|
||||||
println!("Test run number {}.", i + 1);
|
println!("Test run number {}.", i + 1);
|
||||||
tests::network::bandwidth_test(download, output);
|
benchmarks::network::bandwidth_test(download, output);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user