|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "fmgr.h"#include "access/htup_details.h"#include "common/hashfn.h"#include "funcapi.h"#include "injection_stats.h"#include "pgstat.h"#include "utils/builtins.h"#include "utils/pgstat_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | PgStat_StatInjFixedEntry |
| struct | PgStatShared_InjectionPointFixed |
Macros | |
| #define | PGSTAT_KIND_INJECTION_FIXED 26 |
| #define | FIXED_COMP(fld) stat_snap->fld -= reset.fld; |
Typedefs | |
| typedef struct PgStat_StatInjFixedEntry | PgStat_StatInjFixedEntry |
| typedef struct PgStatShared_InjectionPointFixed | PgStatShared_InjectionPointFixed |
Functions | |
| static void | injection_stats_fixed_init_shmem_cb (void *stats) |
| static void | injection_stats_fixed_reset_all_cb (TimestampTz ts) |
| static void | injection_stats_fixed_snapshot_cb (void) |
| void | pgstat_register_inj_fixed (void) |
| void | pgstat_report_inj_fixed (uint32 numattach, uint32 numdetach, uint32 numrun, uint32 numcached, uint32 numloaded) |
| PG_FUNCTION_INFO_V1 (injection_points_stats_fixed) | |
| Datum | injection_points_stats_fixed (PG_FUNCTION_ARGS) |
Variables | |
| static const PgStat_KindInfo | injection_stats_fixed |
| static bool | inj_fixed_loaded = false |
| #define FIXED_COMP | ( | fld | ) | stat_snap->fld -= reset.fld; |
| #define PGSTAT_KIND_INJECTION_FIXED 26 |
Definition at line 68 of file injection_stats_fixed.c.
| typedef struct PgStat_StatInjFixedEntry PgStat_StatInjFixedEntry |
| typedef struct PgStatShared_InjectionPointFixed PgStatShared_InjectionPointFixed |
| Datum injection_points_stats_fixed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 174 of file injection_stats_fixed.c.
References BlessTupleDesc(), CreateTemplateTupleDesc(), heap_form_tuple(), HeapTupleGetDatum(), inj_fixed_loaded, inj_stats_enabled, Int64GetDatum(), PgStat_StatInjFixedEntry::numattach, PgStat_StatInjFixedEntry::numcached, PgStat_StatInjFixedEntry::numdetach, PgStat_StatInjFixedEntry::numloaded, PgStat_StatInjFixedEntry::numrun, PG_RETURN_DATUM, PG_RETURN_NULL, pgstat_get_custom_snapshot_data(), PGSTAT_KIND_INJECTION_FIXED, pgstat_snapshot_fixed(), TupleDescInitEntry(), and values.
|
static |
Definition at line 74 of file injection_stats_fixed.c.
References PgStatShared_InjectionPointFixed::lock, and LWLockInitialize().
|
static |
Definition at line 83 of file injection_stats_fixed.c.
References PgStatShared_InjectionPointFixed::changecount, PgStatShared_InjectionPointFixed::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgstat_get_custom_shmem_data(), PGSTAT_KIND_INJECTION_FIXED, PgStatShared_InjectionPointFixed::reset_offset, PgStat_StatInjFixedEntry::stat_reset_timestamp, and PgStatShared_InjectionPointFixed::stats.
|
static |
Definition at line 98 of file injection_stats_fixed.c.
References PgStatShared_InjectionPointFixed::changecount, FIXED_COMP, PgStatShared_InjectionPointFixed::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgstat_copy_changecounted_stats(), pgstat_get_custom_shmem_data(), pgstat_get_custom_snapshot_data(), PGSTAT_KIND_INJECTION_FIXED, reset(), PgStatShared_InjectionPointFixed::reset_offset, and PgStatShared_InjectionPointFixed::stats.
| PG_FUNCTION_INFO_V1 | ( | injection_points_stats_fixed | ) |
| void pgstat_register_inj_fixed | ( | void | ) |
Definition at line 130 of file injection_stats_fixed.c.
References inj_fixed_loaded, injection_stats_fixed, PGSTAT_KIND_INJECTION_FIXED, and pgstat_register_kind().
Referenced by _PG_init().
| void pgstat_report_inj_fixed | ( | uint32 | numattach, |
| uint32 | numdetach, | ||
| uint32 | numrun, | ||
| uint32 | numcached, | ||
| uint32 | numloaded | ||
| ) |
Definition at line 142 of file injection_stats_fixed.c.
References PgStatShared_InjectionPointFixed::changecount, inj_fixed_loaded, inj_stats_enabled, PgStatShared_InjectionPointFixed::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PgStat_StatInjFixedEntry::numattach, PgStat_StatInjFixedEntry::numcached, PgStat_StatInjFixedEntry::numdetach, PgStat_StatInjFixedEntry::numloaded, PgStat_StatInjFixedEntry::numrun, pgstat_begin_changecount_write(), pgstat_end_changecount_write(), pgstat_get_custom_shmem_data(), PGSTAT_KIND_INJECTION_FIXED, and PgStatShared_InjectionPointFixed::stats.
Referenced by injection_points_attach(), injection_points_attach_func(), injection_points_cached(), injection_points_detach(), injection_points_load(), and injection_points_run().
|
static |
Definition at line 71 of file injection_stats_fixed.c.
Referenced by injection_points_stats_fixed(), pgstat_register_inj_fixed(), and pgstat_report_inj_fixed().
|
static |
Definition at line 51 of file injection_stats_fixed.c.
Referenced by pgstat_register_inj_fixed().