2005-10-04 00:52:26 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* pg_rusage.h
|
|
|
|
* header file for resource usage measurement support routines
|
|
|
|
*
|
|
|
|
*
|
2022-01-08 01:04:57 +01:00
|
|
|
* Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
|
2005-10-04 00:52:26 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/utils/pg_rusage.h
|
2005-10-04 00:52:26 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_RUSAGE_H
|
|
|
|
#define PG_RUSAGE_H
|
|
|
|
|
|
|
|
#include <sys/resource.h>
|
2022-08-13 13:35:24 +02:00
|
|
|
#include <sys/time.h>
|
2005-10-04 00:52:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* State structure for pg_rusage_init/pg_rusage_show */
|
|
|
|
typedef struct PGRUsage
|
|
|
|
{
|
|
|
|
struct timeval tv;
|
|
|
|
struct rusage ru;
|
|
|
|
} PGRUsage;
|
|
|
|
|
|
|
|
|
|
|
|
extern void pg_rusage_init(PGRUsage *ru0);
|
|
|
|
extern const char *pg_rusage_show(const PGRUsage *ru0);
|
|
|
|
|
|
|
|
#endif /* PG_RUSAGE_H */
|