Skip to content

Commit

Permalink
slow statement threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Nov 26, 2024
1 parent a4577f1 commit d89a669
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ demo *args:

demo-native *args:
cargo build --profile test
cargo build --profile test --manifest-path ./sequencer-sqlite/Cargo.toml
scripts/demo-native {{args}}

build:
Expand All @@ -19,9 +20,6 @@ build:
cargo build --profile test
cargo build --profile test --manifest-path ./sequencer-sqlite/Cargo.toml
demo-native *args: build
scripts/demo-native {{args}}

demo-native-mp *args: build
scripts/demo-native -f process-compose.yaml -f process-compose-mp.yml {{args}}

Expand Down
4 changes: 4 additions & 0 deletions sequencer/src/persistence/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ pub struct Options {
#[clap(long, env = "ESPRESSO_SEQUENCER_DATABASE_CONNECTION_TIMEOUT", value_parser = parse_duration, default_value = "30m")]
pub(crate) connection_timeout: Duration,

#[clap(long, env = "ESPRESSO_SEQUENCER_DATABASE_SLOW_STATEMENT_THRESHOLD", value_parser = parse_duration, default_value = "1m")]
pub(crate) slow_statement_threshold: Duration,

/// The minimum number of database connections to maintain at any time.
///
/// The database client will, to the best of its ability, maintain at least `min` open
Expand Down Expand Up @@ -290,6 +293,7 @@ impl TryFrom<Options> for Config {
cfg = cfg.idle_connection_timeout(opt.idle_connection_timeout);
cfg = cfg.min_connections(opt.min_connections);
cfg = cfg.connection_timeout(opt.connection_timeout);
cfg = cfg.slow_statement_threshold(opt.slow_statement_threshold);

#[cfg(not(feature = "embedded-db"))]
{
Expand Down

0 comments on commit d89a669

Please sign in to comment.