File: logtofile_execution_time.c

package info (click to toggle)
pgauditlogtofile 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: ansic: 1,568; makefile: 26; sql: 12; sh: 7
file content (21 lines) | stat: -rw-r--r-- 551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "logtofile_execution_time.h"
#include "logtofile_vars.h"

/**
 * @brief ExecutorStart hook to record the start time of a statement.
 * @param queryDesc
 * @param eflags
 */
void PgAuditLogToFile_ExecutorStart_Time(QueryDesc *queryDesc, int eflags)
{
  INSTR_TIME_SET_CURRENT(pgaudit_ltf_statement_start_time);
}

/**
 * @brief ExecutorEnd hook to calculate and log the statement execution time.
 * @param queryDesc
 */
void PgAuditLogToFile_ExecutorEnd_Time(QueryDesc *queryDesc)
{
  INSTR_TIME_SET_CURRENT(pgaudit_ltf_statement_end_time);
}