Format sources

pull/475/head
Artem Gavrilov 2024-07-18 15:49:10 +02:00
parent a945857020
commit 34061e1f82
4 changed files with 93 additions and 82 deletions

View File

@ -238,7 +238,8 @@ pgsm_attach_shmem(void)
MemoryContextSwitchTo(oldcontext);
}
MemoryContext GetPgsmMemoryContext(void)
MemoryContext
GetPgsmMemoryContext(void)
{
return pgsmStateLocal.pgsm_mem_cxt;
}

View File

@ -1434,7 +1434,10 @@ pgsm_update_entry(pgsmEntry * entry,
int sqlcode_len = error_info ? strlen(error_info->sqlcode) : 0;
int plan_text_len = plan_info ? plan_info->plan_len : 0;
/* Start collecting data for next bucket and reset all counters and timestamps */
/*
* Start collecting data for next bucket and reset all counters and
* timestamps
*/
if (reset)
{
memset(&entry->counters, 0, sizeof(Counters));

View File

@ -284,19 +284,26 @@ typedef struct Blocks
int64 local_blks_written; /* # of local disk blocks written */
int64 temp_blks_read; /* # of temp blocks read */
int64 temp_blks_written; /* # of temp blocks written */
double shared_blk_read_time; /* time spent reading shared blocks, in msec */
double shared_blk_write_time; /* time spent writing shared blocks, in msec */
double local_blk_read_time; /* time spent reading local blocks, in msec */
double local_blk_write_time; /* time spent writing local blocks, in msec */
double shared_blk_read_time; /* time spent reading shared blocks,
* in msec */
double shared_blk_write_time; /* time spent writing shared blocks,
* in msec */
double local_blk_read_time; /* time spent reading local blocks, in
* msec */
double local_blk_write_time; /* time spent writing local blocks, in
* msec */
double temp_blk_read_time; /* time spent reading temp blocks, in msec */
double temp_blk_write_time; /* time spent writing temp blocks, in msec */
double temp_blk_write_time; /* time spent writing temp blocks, in
* msec */
/*
* Variables for local entry. The values to be passed to pgsm_update_entry
* from pgsm_store.
*/
instr_time instr_shared_blk_read_time; /* time spent reading shared blocks */
instr_time instr_shared_blk_write_time; /* time spent writing shared blocks */
instr_time instr_shared_blk_read_time; /* time spent reading shared
* blocks */
instr_time instr_shared_blk_write_time; /* time spent writing shared
* blocks */
instr_time instr_local_blk_read_time; /* time spent reading local blocks */
instr_time instr_local_blk_write_time; /* time spent writing local blocks */
instr_time instr_temp_blk_read_time; /* time spent reading temp blocks */