Eneboo - Documentación para desarrolladores
|
00001 /*------------------------------------------------------------------------- 00002 * 00003 * pg_rusage.h 00004 * header file for resource usage measurement support routines 00005 * 00006 * 00007 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group 00008 * Portions Copyright (c) 1994, Regents of the University of California 00009 * 00010 * $PostgreSQL: pgsql/src/include/utils/pg_rusage.h,v 1.1 2005/10/03 22:52:26 tgl Exp $ 00011 * 00012 *------------------------------------------------------------------------- 00013 */ 00014 #ifndef PG_RUSAGE_H 00015 #define PG_RUSAGE_H 00016 00017 #include <sys/time.h> 00018 00019 #ifdef HAVE_GETRUSAGE 00020 #include <sys/resource.h> 00021 #else 00022 #include "rusagestub.h" 00023 #endif 00024 00025 00026 /* State structure for pg_rusage_init/pg_rusage_show */ 00027 typedef struct PGRUsage 00028 { 00029 struct timeval tv; 00030 struct rusage ru; 00031 } PGRUsage; 00032 00033 00034 extern void pg_rusage_init(PGRUsage *ru0); 00035 extern const char *pg_rusage_show(const PGRUsage *ru0); 00036 00037 #endif /* PG_RUSAGE_H */