-
Notifications
You must be signed in to change notification settings - Fork 66
[+] add stat_statements_jit metric
#1054
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
base: master
Are you sure you want to change the base?
[+] add stat_statements_jit metric
#1054
Conversation
Pull Request Test Coverage Report for Build 19931639127Details
💛 - Coveralls |
d11d8a8 to
da3e81c
Compare
It queries `pg_stat_statements` to identify queries with high percent of execution time spent in JIT.
It queries the `stat_statements_jit` metric table to identify the percentage of jit in the current total query execution time within the specified grafana time window.
It queries the `stat_statements_jit` metric table to identify the percentage of jit in the current total query execution time for each dbname within the specified grafana time window.
The `Auto` option will contain a value identical to the current time range, so we can partially avoid the imprecision of `$__timeGroup()`
the minimum version where `jit_generation_time` field is available in `pg_stat_statements`.
2c034f7 to
041510b
Compare
|
We don't need another metric. We need updated |
That's what I did at first, but I noticed that |
|
The reason for a separate We want to run it every minute because it's lightweight. But everything else goes into |
Yep, exactly; Also, if we just fetch another column in sounds okay? |
|
No. jit goes to stat_statements |
|
The thing is, if jit is not slow, we don't care |
|
Good question is: should we rewrite |
|
Another thing to think is plan related metrics. We need them as well |
On my todo list. |
- `jit_generation_time` is now queried directly in `stat_statements` metric.
… metric. `stat_statements_jit` metric has been removed and jit is now queried directly via `stat_statements`
done, please review. Also, if you think there are more useful panels for |
internal/metrics/metrics.yaml
Outdated
| round(sum(temp_blk_write_time)::numeric, 3)::double precision as temp_blk_write_time, | ||
| sum(wal_fpi) as wal_fpi, | ||
| sum(wal_bytes) as wal_bytes, | ||
| round(sum(s.jit_generation_time)::numeric, 3)::double precision as jit_generation_time, |
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.
I don't think we want to duplicate it here
f963038 to
09f2cc3
Compare
|
why did you remove |
Oh, Isn't that what you meant here :-) #1054 (comment)? |
stat_statementsmetric to queryjit_generation_time.JIT %panel to0. Health Checkdashboard.Top n by JIT %toGlobal Healthdashboard.JIT %column inQuery Performance Analysisdashboard.The
JIT %represents the total amount of query execution time spent in JIT.Closes: #1046