-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow query log #1052
Slow query log #1052
Conversation
} | ||
|
||
/// Creates a new `SlowQueryConfig` with [THRESHOLD_QUERIES_MILLIS] for `queries` and the rest set to [None]. | ||
pub fn with_defaults() -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to confirm which values will be nice for bitcraft and how to read them.
11fb6fb
to
4659ba9
Compare
4659ba9
to
279596b
Compare
279596b
to
f1ec5b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @mamcx! Just a few more asks, but it should be ready to merge after that.
f1ec5b2
to
6a17bf7
Compare
crates/core/src/config.rs
Outdated
ReadConfigOption::SlowQueryThreshold => "slow_ad_hoc_query_threshold", | ||
ReadConfigOption::SlowIncrementalUpdatesThreshold => "slow_incremental_query_threshold", | ||
ReadConfigOption::SlowSubscriptionsThreshold => "slow_subscription_query_threshold", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final naming suggestion :)
ReadConfigOption::SlowQueryThreshold => "slow_ad_hoc_query_threshold", | |
ReadConfigOption::SlowIncrementalUpdatesThreshold => "slow_incremental_query_threshold", | |
ReadConfigOption::SlowSubscriptionsThreshold => "slow_subscription_query_threshold", | |
ReadConfigOption::SlowQueryThreshold => "slow_ad_hoc_query_ms", | |
ReadConfigOption::SlowIncrementalUpdatesThreshold => "slow_tx_update_ms", | |
ReadConfigOption::SlowSubscriptionsThreshold => "slow_subscription_query_ms", |
6a17bf7
to
b62bcca
Compare
b62bcca
to
dd35841
Compare
This seems to have regressed
|
Partially resolved by #1110. |
Description of Changes
Closes #1071
Log as
tracing::warn!
a query if it exceeds the threshold.Note: Currently the default is burned here.
Note: The settings are not persited neither are transactional.
Is possible to query and set it at runtime:
The current settings:
Expected complexity level and risk
1
Testing
Describe any testing you've done, and any testing you'd like your reviewers to do,
so that you're confident that all the changes work as expected!
sql cli
thatSET slow_query_threshold TO 1
and running a query print the warningDon't have a way to check for
stdout
.