PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/pg_prng.h"
#include "fmgr.h"
#include "lib/integerset.h"
#include "utils/memutils.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
struct | test_spec |
Functions | |
PG_FUNCTION_INFO_V1 (test_integerset) | |
static void | test_pattern (const test_spec *spec) |
static void | test_empty (void) |
static void | test_single_value (uint64 value) |
static void | check_with_filler (IntegerSet *intset, uint64 x, uint64 value, uint64 filler_min, uint64 filler_max) |
static void | test_single_value_and_filler (uint64 value, uint64 filler_min, uint64 filler_max) |
static void | test_huge_distances (void) |
Datum | test_integerset (PG_FUNCTION_ARGS) |
Variables | |
static const bool | intset_test_stats = false |
PG_MODULE_MAGIC | |
static const test_spec | test_specs [] |
|
static |
Definition at line 466 of file test_integerset.c.
References elog, ERROR, intset(), intset_is_member(), UINT64_FORMAT, value, and x.
Referenced by test_single_value_and_filler().
PG_FUNCTION_INFO_V1 | ( | test_integerset | ) |
|
static |
Definition at line 484 of file test_integerset.c.
References elog, ERROR, intset(), intset_begin_iterate(), intset_create(), intset_is_member(), intset_iterate_next(), NOTICE, PG_UINT64_MAX, UINT64_FORMAT, and x.
Referenced by test_integerset().
|
static |
Definition at line 515 of file test_integerset.c.
References elog, ERROR, i, intset(), intset_add_member(), intset_begin_iterate(), intset_create(), intset_is_member(), intset_iterate_next(), NOTICE, pg_global_prng_state, pg_prng_uint32(), UINT64_FORMAT, val, values, x, and y.
Referenced by test_integerset().
Datum test_integerset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 103 of file test_integerset.c.
References i, lengthof, PG_RETURN_VOID, PG_UINT64_MAX, test_empty(), test_huge_distances(), test_pattern(), test_single_value(), test_single_value_and_filler(), and test_specs.
|
static |
Definition at line 131 of file test_integerset.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, b, CurrentMemoryContext, elog, ERROR, fprintf, GetCurrentTimestamp(), i, idx(), intset(), intset_add_member(), intset_begin_iterate(), intset_create(), intset_is_member(), intset_iterate_next(), intset_memory_usage(), intset_num_entries(), intset_test_stats, MemoryContextDelete(), MemoryContextSetIdentifier(), MemoryContextStats(), MemoryContextSwitchTo(), NOTICE, test_spec::num_values, old_ctx, palloc(), test_spec::pattern_str, pg_global_prng_state, pg_prng_uint64_range(), test_spec::spacing, test_spec::test_name, UINT64_FORMAT, and x.
Referenced by test_integerset().
|
static |
Definition at line 317 of file test_integerset.c.
References elog, ERROR, intset(), intset_add_member(), intset_begin_iterate(), intset_create(), intset_is_member(), intset_iterate_next(), intset_num_entries(), NOTICE, PG_UINT64_MAX, UINT64_FORMAT, value, and x.
Referenced by test_integerset().
|
static |
Definition at line 373 of file test_integerset.c.
References check_with_filler(), elog, ERROR, i, intset(), intset_add_member(), intset_begin_iterate(), intset_create(), intset_iterate_next(), intset_memory_usage(), intset_num_entries(), NOTICE, palloc(), PG_UINT64_MAX, UINT64_FORMAT, value, and x.
Referenced by test_integerset().
Definition at line 32 of file test_integerset.c.
Referenced by test_pattern().
PG_MODULE_MAGIC |
Definition at line 34 of file test_integerset.c.
|
static |
Definition at line 50 of file test_integerset.c.
Referenced by test_integerset().