Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / include / executor / instrument.h
blobe8b52bcb74dc829049a596cf1d10e693bfe5963a
1 /*-------------------------------------------------------------------------
3 * instrument.h
4 * definitions for run-time statistics collection
7 * Copyright (c) 2001-2008, PostgreSQL Global Development Group
9 * $PostgreSQL$
11 *-------------------------------------------------------------------------
13 #ifndef INSTRUMENT_H
14 #define INSTRUMENT_H
16 #include "portability/instr_time.h"
19 typedef struct Instrumentation
21 /* Info about current plan cycle: */
22 bool running; /* TRUE if we've completed first tuple */
23 instr_time starttime; /* Start time of current iteration of node */
24 instr_time counter; /* Accumulated runtime for this node */
25 double firsttuple; /* Time for first tuple of this cycle */
26 double tuplecount; /* Tuples emitted so far this cycle */
27 /* Accumulated statistics across all completed cycles: */
28 double startup; /* Total startup time (in seconds) */
29 double total; /* Total total time (in seconds) */
30 double ntuples; /* Total tuples produced */
31 double nloops; /* # of run cycles for this node */
32 } Instrumentation;
34 extern Instrumentation *InstrAlloc(int n);
35 extern void InstrStartNode(Instrumentation *instr);
36 extern void InstrStopNode(Instrumentation *instr, double nTuples);
37 extern void InstrEndLoop(Instrumentation *instr);
39 #endif /* INSTRUMENT_H */