From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- src/include/utils/pg_rusage.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/include/utils/pg_rusage.h (limited to 'src/include/utils/pg_rusage.h') diff --git a/src/include/utils/pg_rusage.h b/src/include/utils/pg_rusage.h new file mode 100644 index 0000000..a6344ab --- /dev/null +++ b/src/include/utils/pg_rusage.h @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------- + * + * pg_rusage.h + * header file for resource usage measurement support routines + * + * + * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/utils/pg_rusage.h + * + *------------------------------------------------------------------------- + */ +#ifndef PG_RUSAGE_H +#define PG_RUSAGE_H + +#include + +#ifdef HAVE_SYS_RESOURCE_H +#include +#else +#include "rusagestub.h" +#endif + + +/* 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 */ -- cgit v1.2.3