@@ -29,7 +29,7 @@ static bool auto_explain_log_triggers = false;
29
29
static bool auto_explain_log_timing = true;
30
30
static int auto_explain_log_format = EXPLAIN_FORMAT_TEXT ;
31
31
static bool auto_explain_log_nested_statements = false;
32
- static double auto_explain_sample_ratio = 1 ;
32
+ static double auto_explain_sample_rate = 1 ;
33
33
34
34
static const struct config_enum_entry format_options [] = {
35
35
{"text" , EXPLAIN_FORMAT_TEXT , false},
@@ -163,10 +163,10 @@ _PG_init(void)
163
163
NULL ,
164
164
NULL );
165
165
166
- DefineCustomRealVariable ("auto_explain.sample_ratio " ,
166
+ DefineCustomRealVariable ("auto_explain.sample_rate " ,
167
167
"Fraction of queries to process." ,
168
168
NULL ,
169
- & auto_explain_sample_ratio ,
169
+ & auto_explain_sample_rate ,
170
170
1.0 ,
171
171
0.0 ,
172
172
1.0 ,
@@ -209,11 +209,11 @@ static void
209
209
explain_ExecutorStart (QueryDesc * queryDesc , int eflags )
210
210
{
211
211
/*
212
- * For ratio sampling, randomly choose top-level statement. Either
212
+ * For rate sampling, randomly choose top-level statement. Either
213
213
* all nested statements will be explained or none will.
214
214
*/
215
215
if (auto_explain_log_min_duration >= 0 && nesting_level == 0 )
216
- current_query_sampled = (random () < auto_explain_sample_ratio *
216
+ current_query_sampled = (random () < auto_explain_sample_rate *
217
217
MAX_RANDOM_VALUE );
218
218
219
219
if (auto_explain_enabled () && current_query_sampled )
0 commit comments