From 5a3423ad8ee171fbf08317917981effe47d211eb Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Fri, 8 Sep 2023 15:05:12 +0200 Subject: Add JIT deform_counter generation_counter includes time spent on both JIT:ing expressions and tuple deforming which are configured independently via options jit_expressions and jit_tuple_deforming. As they are combined in the same counter it's not apparent what fraction of time the tuple deforming takes. This adds deform_counter dedicated to tuple deforming, which allows seeing more directly the influence jit_tuple_deforming is having on the query. The counter is exposed in EXPLAIN and pg_stat_statements bumpin pg_stat_statements to 1.11. Author: Dmitry Dolgov <9erthalion6@gmail.com> Reviewed-by: Pavel Stehule Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20220612091253.eegstkufdsu4kfls@erthalion.local --- doc/src/sgml/jit.sgml | 2 +- doc/src/sgml/pgstatstatements.sgml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/jit.sgml b/doc/src/sgml/jit.sgml index 998c972e8ba..1921557cb82 100644 --- a/doc/src/sgml/jit.sgml +++ b/doc/src/sgml/jit.sgml @@ -170,7 +170,7 @@ SET JIT: Functions: 3 Options: Inlining false, Optimization false, Expressions true, Deforming true - Timing: Generation 1.259 ms, Inlining 0.000 ms, Optimization 0.797 ms, Emission 5.048 ms, Total 7.104 ms + Timing: Generation 1.259 ms (Deform 0.000 ms), Inlining 0.000 ms, Optimization 0.797 ms, Emission 5.048 ms, Total 7.104 ms Execution Time: 7.416 ms As visible here, JIT was used, but inlining and diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index b1214ee6453..7e7c5c9ff82 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -420,6 +420,25 @@ + + + jit_deform_count bigint + + + Total number of tuple deform functions JIT-compiled by the statement + + + + + + jit_deform_time double precision + + + Total time spent by the statement on JIT-compiling tuple deform + functions, in milliseconds + + + jit_inlining_count bigint -- cgit v1.2.3