skip writing to log on CI

This commit is contained in:
Pere Diaz Bou
2025-05-27 11:29:04 +02:00
parent cf70b7c508
commit 650a5b8b1a
3 changed files with 20 additions and 7 deletions

View File

@@ -44,6 +44,6 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Run ignored long tests
run: cargo run -p limbo_stress -- -t 1 -i 10000
run: cargo run -p limbo_stress -- -t 1 -i 10000 -s
env:
RUST_BACKTRACE: 1

View File

@@ -309,18 +309,22 @@ fn generate_plan(opts: &Opts) -> Result<Plan, Box<dyn std::error::Error + Send +
nr_iterations: opts.nr_iterations,
nr_threads: opts.nr_threads,
};
writeln!(log_file, "{}", opts.nr_threads)?;
writeln!(log_file, "{}", opts.nr_iterations)?;
writeln!(log_file, "{}", ddl_statements.len())?;
for stmt in &ddl_statements {
writeln!(log_file, "{}", stmt)?;
if !opts.skip_log {
writeln!(log_file, "{}", opts.nr_threads)?;
writeln!(log_file, "{}", opts.nr_iterations)?;
writeln!(log_file, "{}", ddl_statements.len())?;
for stmt in &ddl_statements {
writeln!(log_file, "{}", stmt)?;
}
}
plan.ddl_statements = ddl_statements;
for _ in 0..opts.nr_threads {
let mut queries = vec![];
for _ in 0..opts.nr_iterations {
let sql = generate_random_statement(&schema);
writeln!(log_file, "{}", sql)?;
if !opts.skip_log {
writeln!(log_file, "{}", sql)?;
}
queries.push(sql);
}
plan.queries_per_thread.push(queries);

View File

@@ -35,6 +35,15 @@ pub struct Opts {
)]
pub load_log: bool,
/// Skip writing to log file
#[clap(
short = 's',
long = "skip-log",
help = "load log file instead of creating a new one",
default_value_t = false
)]
pub skip_log: bool,
/// Database file
#[clap(
short = 'd',