1 /* 2 * 3 * pgpool: a language independent connection pool server for PostgreSQL 4 * written by Tatsuo Ishii 5 * 6 * Copyright (c) 2003-2020 PgPool Global Development Group 7 * 8 * Permission to use, copy, modify, and distribute this software and 9 * its documentation for any purpose and without fee is hereby 10 * granted, provided that the above copyright notice appear in all 11 * copies and that both that copyright notice and this permission 12 * notice appear in supporting documentation, and that the name of the 13 * author not be used in advertising or publicity pertaining to 14 * distribution of the software without specific, written prior 15 * permission. The author makes no representations about the 16 * suitability of this software for any purpose. It is provided "as 17 * is" without express or implied warranty. 18 * 19 */ 20 21 #ifndef statistics_h 22 #define statistics_h 23 24 extern size_t stat_shared_memory_size(void); 25 extern void stat_set_stat_area(void *address); 26 extern void stat_init_stat_area(void); 27 extern void stat_count_up(int backend_node_id, Node *parsetree); 28 extern void error_stat_count_up(int backend_node_id, char *str); 29 extern uint64 stat_get_select_count(int backend_node_id); 30 extern uint64 stat_get_insert_count(int backend_node_id); 31 extern uint64 stat_get_update_count(int backend_node_id); 32 extern uint64 stat_get_delete_count(int backend_node_id); 33 extern uint64 stat_get_ddl_count(int backend_node_id); 34 extern uint64 stat_get_other_count(int backend_node_id); 35 extern uint64 stat_get_panic_count(int backend_node_id); 36 extern uint64 stat_get_fatal_count(int backend_node_id); 37 extern uint64 stat_get_error_count(int backend_node_id); 38 39 #endif /* statistics_h */ 40