-
Notifications
You must be signed in to change notification settings - Fork 55
/
sizes.c
34 lines (26 loc) · 1.03 KB
/
sizes.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "config.h"
#include <stdio.h>
#include "memcached.h"
static void display(const char *name, size_t size)
{
printf("%s\t%d\n", name, (int)size);
}
int main(int argc, char **argv)
{
display("Thread stats", sizeof(struct thread_stats));
display("Global stats", sizeof(struct mc_stats));
display("Settings", sizeof(struct settings));
display("Libevent thread", sizeof(LIBEVENT_THREAD));
display("Connection", sizeof(conn));
printf("----------------------------------------\n");
display("libevent thread cumulative", sizeof(LIBEVENT_THREAD));
display("Thread stats cumulative\t", sizeof(struct thread_stats));
printf("----------------------------------------\n");
display("hash item info\t", sizeof(item_info));
display("elem item info\t", sizeof(eitem_info));
display("item attributes\t", sizeof(item_attr));
display("eflag filter\t", sizeof(eflag_filter));
display("eflag update\t", sizeof(eflag_update));
display("Pipe reponse buffer", PIPE_RES_MAX_SIZE);
return 0;
}