From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Expose JIT counters/timing in pg_stat_statements |
Date: | 2022-03-07 12:40:34 |
Message-ID: | CABUevExSce==WCZdHZmbQ9kJRJ3pQzrKtLw8GQux5gbnjbrRQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 25, 2022 at 5:43 PM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
>
> On Fri, Feb 25, 2022 at 05:38:45PM +0100, Magnus Hagander wrote:
> >
> > Per some off-list discussion with Julien, we have clearly been talking
> > in slightly different terms. So let's summarize the options into what
> > theÿ́d actually be:
> >
> > Option 0: what is int he patch now
> >
> > Option 1:
> > jit_count - number of executions using jit
> > total_jit_time - for sum of functions+inlining+optimization+emission time
> > min_jit_time - for sum of functions+inlining+optimization+emission time
> > max_jit_time - for sum of functions+inlining+optimization+emission time
> > mean_jit_time - for sum of functions+inlining+optimization+emission time
> > stddev_jit_time - for sum of functions+inlining+optimization+emission time
> > jit_functions - number of functions
> > jit_inlining_count - number of executions where inlining happened
> > jit_optimization_count - number of executions where optimization happened
> > jit_emission_count - number of executions where emission happened
> >
> > Option 2:
> > jit_count
> > jit_functions
> > jit_generation_time
> > jit_inlining_count
> > jit_inlining_time
> > jit_optimization_count
> > jit_optimization_time
> > jit_emission_count
> > jit_emission_time
>
> I'm for option 2, I think it's important to have the timing details for
> inlining and optimization and be able to compute correct stats.
I wonder if there might be an interesting middle ground, or if that is
making it too much. That is, we could have an
Option 3:
jit_count
total_jit_time - for sum of functions+inlining+optimization+emission time
min_jit_time - for sum of functions+inlining+optimization+emission time
max_jit_time - for sum of functions+inlining+optimization+emission time
mean_jit_time - for sum of functions+inlining+optimization+emission time
stddev_jit_time - for sum of functions+inlining+optimization+emission time
jit_functions
jit_generation_time
jit_inlining_count
jit_inlining_time
jit_optimization_count
jit_optimization_time
jit_emission_count
jit_emission_time
That is, we'd get the more detailed timings across the total time, but
not on the details. But that might be overkill.
But -- here's an updated patched based on Option 2.
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
Attachment | Content-Type | Size |
---|---|---|
pg_stat_statements_jit_v2.patch | text/x-patch | 12.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2022-03-07 12:44:14 | Re: logical replication empty transactions |
Previous Message | Magnus Hagander | 2022-03-07 12:27:02 | Re: Expose JIT counters/timing in pg_stat_statements |