We now check return key size for memcached_fetch() to make sure it is not
[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 __MEMCACHED_STATS_H__
13 #define __MEMCACHED_STATS_H__
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 struct memcached_stat_st {
20 uint32_t connection_structures;
21 uint32_t curr_connections;
22 uint32_t curr_items;
23 uint32_t pid;
24 uint32_t pointer_size;
25 uint32_t rusage_system_microseconds;
26 uint32_t rusage_system_seconds;
27 uint32_t rusage_user_microseconds;
28 uint32_t rusage_user_seconds;
29 uint32_t threads;
30 uint32_t time;
31 uint32_t total_connections;
32 uint32_t total_items;
33 uint32_t uptime;
34 uint64_t bytes;
35 uint64_t bytes_read;
36 uint64_t bytes_written;
37 uint64_t cmd_get;
38 uint64_t cmd_set;
39 uint64_t evictions;
40 uint64_t get_hits;
41 uint64_t get_misses;
42 uint64_t limit_maxbytes;
43 char version[MEMCACHED_VERSION_STRING_LENGTH];
44 memcached_st *root;
45 };
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 }
67 #endif
68
69 #endif /* __MEMCACHED_STATS_H__ */