-
Notifications
You must be signed in to change notification settings - Fork 759
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
feat(metrics): display scan rows/bytes, write rows/bytes in global counter metrics #17266
Conversation
The metrics recorder has some locks, let's run the performance tests. |
} | ||
} | ||
|
||
pub fn incr(&self, progress_values: &ProgressValues) { | ||
self.rows.fetch_add(progress_values.rows, Ordering::Relaxed); | ||
self.bytes | ||
.fetch_add(progress_values.bytes, Ordering::Relaxed); | ||
if let Some(hook) = &self.hook { |
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 might result in double counting if cluster mode.
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.
can you help explain more about this?
Docker Image for PR
|
close this due to performance decrease, let me try another with prometheus' collector |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
currently we've tracked the scan rows/bytes, write rows/bytes progress value in query stats. and collected them into metrics in query_finished.
but this have an issue like, given a COPY statement which executed for 10 hours. this
databend_query_scan_rows
will kept to be zero during the executation, can not reflect the executing progress in metrics.this pr add a hook on the
Progress
struct to increment the global metrics as well as the local stats.Tests
Type of change
This change is