This commit is contained in:
2024-06-30 22:54:23 +02:00
parent f468f192d8
commit 1f14cf8212
9 changed files with 3941 additions and 0 deletions

View File

@ -6,20 +6,24 @@ use std::path::{Path, PathBuf};
pub enum ConsumptionBackend {
/// Constant consumption value
Constant {
/// The constant value to use
#[clap(short, long, default_value_t = 500)]
value: i32,
},
/// Generate random consumption value
Random {
/// Minimum acceptable generated value
#[clap(long, default_value_t = -5000)]
min: i32,
/// Maximum acceptable generated value
#[clap(long, default_value_t = 20000)]
max: i32,
},
/// Read consumption value in a file, on the filesystem
File {
/// The path to the file that will be read to process consumption values
#[clap(short, long, default_value = "/dev/shm/consumption.txt")]
path: String,
},