PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/pg_prng.h"
#include "fmgr.h"
#include "lib/bloomfilter.h"
#include "miscadmin.h"
Go to the source code of this file.
Macros | |
#define | MAX_ELEMENT_BYTES 21 |
#define | FPOSITIVE_THRESHOLD 0.01 |
Functions | |
static void | populate_with_dummy_strings (bloom_filter *filter, int64 nelements) |
static int64 | nfalsepos_for_missing_strings (bloom_filter *filter, int64 nelements) |
static void | create_and_test_bloom (int power, int64 nelements, int callerseed) |
PG_FUNCTION_INFO_V1 (test_bloomfilter) | |
Datum | test_bloomfilter (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
#define FPOSITIVE_THRESHOLD 0.01 |
Definition at line 25 of file test_bloomfilter.c.
#define MAX_ELEMENT_BYTES 21 |
Definition at line 23 of file test_bloomfilter.c.
|
static |
Definition at line 72 of file test_bloomfilter.c.
References bloom_create(), bloom_free(), bloom_prop_bits_set(), DEBUG1, elog, ereport, errmsg_internal(), FPOSITIVE_THRESHOLD, INT64_FORMAT, nfalsepos_for_missing_strings(), pg_global_prng_state, pg_prng_int32p(), populate_with_dummy_strings(), UINT64_FORMAT, and WARNING.
Referenced by test_bloomfilter().
|
static |
Definition at line 52 of file test_bloomfilter.c.
References bloom_lacks_element(), CHECK_FOR_INTERRUPTS, element(), i, INT64_FORMAT, MAX_ELEMENT_BYTES, and snprintf.
Referenced by create_and_test_bloom().
PG_FUNCTION_INFO_V1 | ( | test_bloomfilter | ) |
|
static |
Definition at line 32 of file test_bloomfilter.c.
References bloom_add_element(), CHECK_FOR_INTERRUPTS, element(), i, INT64_FORMAT, MAX_ELEMENT_BYTES, and snprintf.
Referenced by create_and_test_bloom().
Datum test_bloomfilter | ( | PG_FUNCTION_ARGS | ) |
Definition at line 113 of file test_bloomfilter.c.
References create_and_test_bloom(), DEBUG1, elog, ERROR, i, PG_GETARG_INT32, PG_GETARG_INT64, and PG_RETURN_VOID.
PG_MODULE_MAGIC |
Definition at line 20 of file test_bloomfilter.c.