summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a561f88)
raw | patch | inline | side by side (parent: a561f88)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 9 Apr 2010 20:20:21 +0000 (22:20 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 9 Apr 2010 20:20:21 +0000 (22:20 +0200) |
src/pinba.c | patch | blob | history |
diff --git a/src/pinba.c b/src/pinba.c
index 56bd9e8d8ef2f8fd1c96a32c383821610c79723a..da54e9d52d7bf2c25703f6ca7567bfb4bbe393cd 100644 (file)
--- a/src/pinba.c
+++ b/src/pinba.c
/*
* Private data structures
*/
-typedef struct _pinba_statres_ pinba_statres_t;
-struct _pinba_statres_ {
- const char *name;
- double req_per_sec;
- double req_time;
- double ru_utime;
- double ru_stime;
- double doc_size;
- double mem_peak;
-};
-
-struct pinba_socket_s {
+/* {{{ */
+struct pinba_socket_s
+{
struct pollfd fd[PINBA_MAX_SOCKETS];
nfds_t fd_num;
};
typedef struct pinba_socket_s pinba_socket_t;
-typedef double pinba_time_t;
-typedef uint32_t pinba_size_t;
-
/* Fixed point counter value. n is the decimal part multiplied by 10^9. */
struct float_counter_s
{
struct pinba_statnode_s
{
- /* collector name */
+ /* collector name, used as plugin instance */
char *name;
/* query data */
gauge_t mem_peak;
};
typedef struct pinba_statnode_s pinba_statnode_t;
+/* }}} */
/*
* Module global variables
*/
+/* {{{ */
static pinba_statnode_t *stat_nodes = NULL;
static unsigned int stat_nodes_num = 0;
static pthread_mutex_t stat_nodes_lock;
static _Bool collector_thread_running = 0;
static _Bool collector_thread_do_shutdown = 0;
static pthread_t collector_thread_id;
+/* }}} */
/*
* Functions