summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a692404)
raw | patch | inline | side by side (parent: a692404)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 9 Apr 2010 13:00:03 +0000 (15:00 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 9 Apr 2010 13:00:03 +0000 (15:00 +0200) |
src/pinba.c | patch | blob | history |
diff --git a/src/pinba.c b/src/pinba.c
index be8ed571a6b00b3c1965209a92be37aac0b0dc58..b0aa439fd547c8754fd0a39d3f5d0d6570bea495 100644 (file)
--- a/src/pinba.c
+++ b/src/pinba.c
struct event *accept_event;
};
-typedef double pinba_time;
-typedef uint32_t pinba_size;
+typedef double pinba_time_t;
+typedef uint32_t pinba_size_t;
-static pinba_time now (void)
+static pinba_time_t now (void)
{
static struct timeval tv;
static struct event_base *temp_base = NULL;
-static pinba_socket *temp_sock = NULL;
+static pinba_socket_t *temp_sock = NULL;
static pthread_t temp_thrd;
char *server;
char *script;
/* collected data */
- pinba_time last_coll;
- pinba_size req_count;
- pinba_time req_time;
- pinba_time ru_utime;
- pinba_time ru_stime;
- pinba_size doc_size;
- pinba_size mem_peak;
+ pinba_time_t last_coll;
+ pinba_size_t req_count;
+ pinba_time_t req_time;
+ pinba_time_t ru_utime;
+ pinba_time_t ru_stime;
+ pinba_size_t doc_size;
+ pinba_size_t mem_peak;
};
static unsigned int stat_nodes_count=0;
unsigned int index)
{
pinba_statnode* node;
- pinba_time delta;
+ pinba_time_t delta;
if (stat_nodes_count == 0)
return 0;
return NULL;
}
-static void pinba_socket_free (pinba_socket *socket) /* {{{ */
+static void pinba_socket_free (pinba_socket_t *socket) /* {{{ */
{
if (!socket)
return;
@@ -396,11 +396,11 @@ static void pinba_udp_read_callback_fn (int sock, short event, void *arg) /* {{{
} /* while (42) */
} /* }}} void pinba_udp_read_callback_fn */
-static pinba_socket *pinba_socket_open (const char *ip, /* {{{ */
+static pinba_socket_t *pinba_socket_open (const char *ip, /* {{{ */
int listen_port)
{
struct sockaddr_in addr;
- pinba_socket *s;
+ pinba_socket_t *s;
int sfd, flags, yes = 1;
if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
return NULL;
}
- s = (pinba_socket *)calloc(1, sizeof(pinba_socket));
+ s = (pinba_socket_t *)calloc(1, sizeof(pinba_socket_t));
if (!s) {
return NULL;
}