Skip to content

Commit 4639fd5

Browse files
gabriele-0201pepyakin
authored andcommitted
chore(torture): update some names
update some old `orture` vestigials and remove all `workload-`s prefix in the cli
1 parent c2a12a6 commit 4639fd5

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

torture/src/logging.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use tracing::{span, Level};
66
use tracing_subscriber::{fmt, EnvFilter};
77
use tracing_subscriber::{prelude::*, registry::Registry, Layer};
88

9-
const ENV_NAME_COMMON: &str = "ORTURE_ALL_LOG";
10-
const ENV_NAME_AGENT: &str = "ORTURE_AGENT_LOG";
11-
const ENV_NAME_SUPERVISOR: &str = "ORTURE_SUPERVISOR_LOG";
9+
const ENV_NAME_COMMON: &str = "TORTURE_ALL_LOG";
10+
const ENV_NAME_AGENT: &str = "TORTURE_AGENT_LOG";
11+
const ENV_NAME_SUPERVISOR: &str = "TORTURE_SUPERVISOR_LOG";
1212

1313
enum Kind {
1414
Agent,

torture/src/supervisor/cli.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct WorkloadParams {
2424
/// Accepted values are in the range of 0 to 100
2525
#[clap(default_value = "10")]
2626
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))]
27-
#[arg(long = "workload-delete-bias", short = 'd')]
27+
#[arg(long = "delete-bias", short = 'd')]
2828
pub delete: u8,
2929

3030
/// When generating a value, the probability of generating a value that will spill into the
@@ -33,7 +33,7 @@ pub struct WorkloadParams {
3333
/// Accepted values are in the range of 0 to 100
3434
#[clap(default_value = "10")]
3535
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))]
36-
#[arg(long = "workload-overflow-bias", short = 'o')]
36+
#[arg(long = "overflow-bias", short = 'o')]
3737
pub overflow: u8,
3838

3939
/// When generating a key, whether it should be one that was appeared somewhere
@@ -42,49 +42,49 @@ pub struct WorkloadParams {
4242
/// Accepted values are in the range of 0 to 100
4343
#[clap(default_value = "50")]
4444
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))]
45-
#[arg(long = "workload-new-key-bias", short = 'n')]
45+
#[arg(long = "new-key-bias", short = 'n')]
4646
pub new_key: u8,
4747

4848
/// The number of times a workload will be executed.
4949
#[clap(default_value = "50")]
50-
#[arg(long = "workload-iterations", short = 'i')]
50+
#[arg(long = "iterations", short = 'i')]
5151
pub iterations: usize,
5252

5353
/// The size of a single workload iteration, the number of changesets per commit.
5454
#[clap(default_value = "5000")]
55-
#[arg(long = "workload-size", short = 's')]
55+
#[arg(long = "size", short = 's')]
5656
pub size: usize,
5757

5858
/// Whether the size of each workload should be random or not.
5959
///
60-
/// If specified, the size of each commit will be within 0..workload-size,
61-
/// otherwise it will always be workload-size.
60+
/// If specified, the size of each commit will be within `0..size`,
61+
/// otherwise it will always be `size`.
6262
#[clap(default_value = "false")]
63-
#[arg(long = "workload-random-size")]
63+
#[arg(long = "random-size")]
6464
pub random_size: bool,
6565

6666
/// When exercising a new commit, the probability of causing it to crash.
6767
///
6868
/// Accepted values are in the range of 0 to 100
6969
#[clap(default_value = "20")]
7070
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))]
71-
#[arg(long = "workload-commit-crash")]
71+
#[arg(long = "commit-crash")]
7272
pub crash: u8,
7373

7474
/// Instead of exercising a new commit, this is a probability of executing a rollback.
7575
///
7676
/// Accepted values are in the range of 0 to 100
7777
#[clap(default_value = "5")]
7878
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))]
79-
#[arg(long = "workload-rollback")]
79+
#[arg(long = "rollback")]
8080
pub rollback: u8,
8181

8282
/// The max amount of blocks involved in a rollback.
8383
///
8484
/// The effective number of blocks used for each rollback is randomly generated in the range
8585
/// 0..max_rollback_blocks.
8686
#[clap(default_value = "10")]
87-
#[arg(long = "workload-max-rollback-blocks")]
87+
#[arg(long = "max-rollback-blocks")]
8888
pub max_rollback_blocks: usize,
8989

9090
/// Whether to ensure the correct application of the changest after every commit.

torture/src/supervisor/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async fn run_workload(
166166
) -> Result<Option<InvestigationFlag>> {
167167
// This creates a temp dir for the working dir of the workload.
168168
let workdir = tempfile::Builder::new()
169-
.prefix("orture-")
169+
.prefix("torture-")
170170
.suffix(format!("-workload-{}", workload_id).as_str())
171171
.tempdir()
172172
.expect("Failed to create a temp dir");

0 commit comments

Comments
 (0)