Fix IO call to use bool.
[m6w6/libmemcached] / libmemcached / stats.h
1 /* LibMemcached
2 * Copyright (C) 2006-2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 *
8 * Summary: Collect up the stats for a memcached server.
9 *
10 */
11
12 #ifndef __LIBMEMCACHED_STATS_H__
13 #define __LIBMEMCACHED_STATS_H__
14
15 struct memcached_stat_st {
16 uint32_t connection_structures;
17 uint32_t curr_connections;
18 uint32_t curr_items;
19 uint32_t pid;
20 uint32_t pointer_size;
21 uint32_t rusage_system_microseconds;
22 uint32_t rusage_system_seconds;
23 uint32_t rusage_user_microseconds;
24 uint32_t rusage_user_seconds;
25 uint32_t threads;
26 uint32_t time;
27 uint32_t total_connections;
28 uint32_t total_items;
29 uint32_t uptime;
30 uint64_t bytes;
31 uint64_t bytes_read;
32 uint64_t bytes_written;
33 uint64_t cmd_get;
34 uint64_t cmd_set;
35 uint64_t evictions;
36 uint64_t get_hits;
37 uint64_t get_misses;
38 uint64_t limit_maxbytes;
39 char version[MEMCACHED_VERSION_STRING_LENGTH];
40 memcached_st *root;
41 };
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 LIBMEMCACHED_API
48 void memcached_stat_free(memcached_st *, memcached_stat_st *);
49
50 LIBMEMCACHED_API
51 memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_return_t *error);
52
53 LIBMEMCACHED_API
54 memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char *args,
55 const char *hostname, in_port_t port);
56
57 LIBMEMCACHED_API
58 char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *memc_stat,
59 const char *key, memcached_return_t *error);
60
61 LIBMEMCACHED_API
62 char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *memc_stat,
63 memcached_return_t *error);
64
65 #ifdef __cplusplus
66 } // extern "C"
67 #endif
68
69 #endif /* __LIBMEMCACHED_STATS_H__ */