Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix of the sampling (was missing one percent of the queries).

  • Loading branch information...
commit 83af8a8ae361f541e1dc96790071a41e72980419 1 parent 80fafad
@tvondra authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  queryhist.c
View
2  queryhist.c
@@ -285,7 +285,7 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
seconds = queryDesc->totaltime->total;
/* N % 100 returns value 0-99, so we need to subtract 1 from the sample_pct */
- if ((histogram_initialized) && (rand() % 100 < (default_histogram_sample_pct-1))) {
+ if ((histogram_initialized) && (rand() % 100 < default_histogram_sample_pct)) {
query_hist_add_query(seconds);
}
Please sign in to comment.
Something went wrong with that request. Please try again.