mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-15 21:14:21 +01:00
skip writing to log on CI
This commit is contained in:
2
.github/workflows/long_fuzz_tests_btree.yml
vendored
2
.github/workflows/long_fuzz_tests_btree.yml
vendored
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user