PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pg_rusage.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_rusage.h
4  * header file for resource usage measurement support routines
5  *
6  *
7  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/utils/pg_rusage.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PG_RUSAGE_H
15 #define PG_RUSAGE_H
16 
17 #include <sys/resource.h>
18 #include <sys/time.h>
19 
20 
21 /* State structure for pg_rusage_init/pg_rusage_show */
22 typedef struct PGRUsage
23 {
24  struct timeval tv;
25  struct rusage ru;
27 
28 
29 extern void pg_rusage_init(PGRUsage *ru0);
30 extern const char *pg_rusage_show(const PGRUsage *ru0);
31 
32 #endif /* PG_RUSAGE_H */
struct PGRUsage PGRUsage
const char * pg_rusage_show(const PGRUsage *ru0)
Definition: pg_rusage.c:40
void pg_rusage_init(PGRUsage *ru0)
Definition: pg_rusage.c:27
struct rusage ru
Definition: pg_rusage.h:25
struct timeval tv
Definition: pg_rusage.h:24