31InstrAlloc(
int n,
int instrument_options,
bool async_mode)
44 for (
i = 0;
i < n;
i++)
73 elog(
ERROR,
"InstrStartNode called twice in a row");
100 elog(
ERROR,
"InstrStopNode called without start");
151 elog(
ERROR,
"InstrEndLoop called on running node");
171 if (!
dst->running &&
add->running)
174 dst->firsttuple =
add->firsttuple;
176 else if (
dst->running &&
add->running &&
178 dst->firsttuple =
add->firsttuple;
182 dst->tuplecount +=
add->tuplecount;
185 dst->ntuples +=
add->ntuples;
186 dst->ntuples2 +=
add->ntuples2;
187 dst->nloops +=
add->nloops;
188 dst->nfiltered1 +=
add->nfiltered1;
189 dst->nfiltered2 +=
add->nfiltered2;
192 if (
dst->need_bufusage)
195 if (
dst->need_walusage)
229 dst->shared_blks_hit +=
add->shared_blks_hit;
230 dst->shared_blks_read +=
add->shared_blks_read;
231 dst->shared_blks_dirtied +=
add->shared_blks_dirtied;
232 dst->shared_blks_written +=
add->shared_blks_written;
233 dst->local_blks_hit +=
add->local_blks_hit;
234 dst->local_blks_read +=
add->local_blks_read;
235 dst->local_blks_dirtied +=
add->local_blks_dirtied;
236 dst->local_blks_written +=
add->local_blks_written;
237 dst->temp_blks_read +=
add->temp_blks_read;
238 dst->temp_blks_written +=
add->temp_blks_written;
281 dst->wal_bytes +=
add->wal_bytes;
282 dst->wal_records +=
add->wal_records;
283 dst->wal_fpi +=
add->wal_fpi;
284 dst->wal_fpi_bytes +=
add->wal_fpi_bytes;
285 dst->wal_buffers_full +=
add->wal_buffers_full;
#define INSTR_TIME_SET_CURRENT(t)
#define INSTR_TIME_GT(x, y)
#define INSTR_TIME_ADD(x, y)
#define INSTR_TIME_IS_ZERO(t)
#define INSTR_TIME_SET_ZERO(t)
#define INSTR_TIME_ACCUM_DIFF(x, y, z)
void InstrUpdateTupleCount(Instrumentation *instr, double nTuples)
void InstrAccumParallelQuery(BufferUsage *bufusage, WalUsage *walusage)
void InstrEndLoop(Instrumentation *instr)
Instrumentation * InstrAlloc(int n, int instrument_options, bool async_mode)
static void BufferUsageAdd(BufferUsage *dst, const BufferUsage *add)
void InstrAggNode(Instrumentation *dst, Instrumentation *add)
static BufferUsage save_pgBufferUsage
void InstrEndParallelQuery(BufferUsage *bufusage, WalUsage *walusage)
static WalUsage save_pgWalUsage
static void WalUsageAdd(WalUsage *dst, WalUsage *add)
void WalUsageAccumDiff(WalUsage *dst, const WalUsage *add, const WalUsage *sub)
void InstrStartParallelQuery(void)
BufferUsage pgBufferUsage
void InstrInit(Instrumentation *instr, int instrument_options)
void BufferUsageAccumDiff(BufferUsage *dst, const BufferUsage *add, const BufferUsage *sub)
void InstrStartNode(Instrumentation *instr)
void InstrStopNode(Instrumentation *instr, double nTuples)
void * palloc0(Size size)
instr_time local_blk_read_time
int64 shared_blks_dirtied
instr_time temp_blk_write_time
instr_time shared_blk_read_time
instr_time shared_blk_write_time
instr_time temp_blk_read_time
instr_time local_blk_write_time
int64 shared_blks_written
BufferUsage bufusage_start