@@ -29,7 +29,7 @@ static bool auto_explain_log_triggers = false;
2929static bool auto_explain_log_timing = true;
3030static int auto_explain_log_format = EXPLAIN_FORMAT_TEXT ;
3131static bool auto_explain_log_nested_statements = false;
32- static double auto_explain_sample_ratio = 1 ;
32+ static double auto_explain_sample_rate = 1 ;
3333
3434static const struct config_enum_entry format_options [] = {
3535 {"text" , EXPLAIN_FORMAT_TEXT , false},
@@ -163,10 +163,10 @@ _PG_init(void)
163163 NULL ,
164164 NULL );
165165
166- DefineCustomRealVariable ("auto_explain.sample_ratio " ,
166+ DefineCustomRealVariable ("auto_explain.sample_rate " ,
167167 "Fraction of queries to process." ,
168168 NULL ,
169- & auto_explain_sample_ratio ,
169+ & auto_explain_sample_rate ,
170170 1.0 ,
171171 0.0 ,
172172 1.0 ,
@@ -209,11 +209,11 @@ static void
209209explain_ExecutorStart (QueryDesc * queryDesc , int eflags )
210210{
211211 /*
212- * For ratio sampling, randomly choose top-level statement. Either
212+ * For rate sampling, randomly choose top-level statement. Either
213213 * all nested statements will be explained or none will.
214214 */
215215 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 *
217217 MAX_RANDOM_VALUE );
218218
219219 if (auto_explain_enabled () && current_query_sampled )
0 commit comments