Go to the source code of this file.
◆ FIXED_COMP
#define FIXED_COMP |
( |
|
fld | ) |
stat_snap->fld -= reset.fld; |
◆ PGSTAT_KIND_INJECTION_FIXED
#define PGSTAT_KIND_INJECTION_FIXED 130 |
◆ PgStat_StatInjFixedEntry
◆ PgStatShared_InjectionPointFixed
◆ injection_points_stats_fixed()
Definition at line 169 of file injection_stats_fixed.c.
static Datum values[MAXATTR]
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
Datum Int64GetDatum(int64 X)
#define PG_RETURN_DATUM(x)
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
static bool inj_fixed_loaded
#define PGSTAT_KIND_INJECTION_FIXED
void pgstat_snapshot_fixed(PgStat_Kind kind)
static void * pgstat_get_custom_snapshot_data(PgStat_Kind kind)
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
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.
◆ injection_stats_fixed_init_shmem_cb()
static void injection_stats_fixed_init_shmem_cb |
( |
void * |
stats | ) |
|
|
static |
◆ injection_stats_fixed_reset_all_cb()
static void injection_stats_fixed_reset_all_cb |
( |
TimestampTz |
ts | ) |
|
|
static |
Definition at line 82 of file injection_stats_fixed.c.
90 sizeof(stats_shmem->
stats),
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
static void * pgstat_get_custom_shmem_data(PgStat_Kind kind)
static void pgstat_copy_changecounted_stats(void *dst, void *src, size_t len, uint32 *cc)
PgStat_StatInjFixedEntry stats
PgStat_StatInjFixedEntry reset_offset
TimestampTz stat_reset_timestamp
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.
◆ injection_stats_fixed_snapshot_cb()
static void injection_stats_fixed_snapshot_cb |
( |
void |
| ) |
|
|
static |
Definition at line 97 of file injection_stats_fixed.c.
108 sizeof(stats_shmem->
stats),
112 memcpy(&
reset, reset_offset,
sizeof(stats_shmem->
stats));
116 #define FIXED_COMP(fld) stat_snap->fld -= reset.fld;
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()
◆ pgstat_register_inj_fixed()
void pgstat_register_inj_fixed |
( |
void |
| ) |
|
◆ pgstat_report_inj_fixed()
Definition at line 141 of file injection_stats_fixed.c.
static void pgstat_end_changecount_write(uint32 *cc)
static void pgstat_begin_changecount_write(uint32 *cc)
References PgStatShared_InjectionPointFixed::changecount, inj_fixed_loaded, inj_stats_enabled, 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_cached(), injection_points_detach(), injection_points_load(), and injection_points_run().
◆ inj_fixed_loaded
bool inj_fixed_loaded = false |
|
static |
◆ injection_stats_fixed
Initial value:= {
.name = "injection_points_fixed",
.fixed_amount = true,
.write_to_file = true,
}
struct PgStat_StatInjFixedEntry PgStat_StatInjFixedEntry
static void injection_stats_fixed_reset_all_cb(TimestampTz ts)
static void injection_stats_fixed_snapshot_cb(void)
static void injection_stats_fixed_init_shmem_cb(void *stats)
Definition at line 50 of file injection_stats_fixed.c.
Referenced by pgstat_register_inj_fixed().