Fixed header file layout
[m6w6/libmemcached] / libmemcached / memcached_stats.h
1 /*
2 * Summary: Stat functions for libmemcached
3 *
4 * Copy: See Copyright for the status of this software.
5 *
6 * Author: Trond Norbye
7 */
8
9 #ifndef LIBMEMCACHED_MEMCACHED_STATS_H
10 #define LIBMEMCACHED_MEMCACHED_STATS_H
11
12 #ifndef LIBMEMCACHED_MEMCACHED_H
13 #error "Please include <libmemcached/memcached.h> instead"
14 #endif
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 struct memcached_analysis_st {
21 uint32_t average_item_size;
22 uint32_t longest_uptime;
23 uint32_t least_free_server;
24 uint32_t most_consumed_server;
25 uint32_t oldest_server;
26 double pool_hit_ratio;
27 uint64_t most_used_bytes;
28 uint64_t least_remaining_bytes;
29 };
30
31 struct memcached_stat_st {
32 uint32_t connection_structures;
33 uint32_t curr_connections;
34 uint32_t curr_items;
35 uint32_t pid;
36 uint32_t pointer_size;
37 uint32_t rusage_system_microseconds;
38 uint32_t rusage_system_seconds;
39 uint32_t rusage_user_microseconds;
40 uint32_t rusage_user_seconds;
41 uint32_t threads;
42 uint32_t time;
43 uint32_t total_connections;
44 uint32_t total_items;
45 uint32_t uptime;
46 uint64_t bytes;
47 uint64_t bytes_read;
48 uint64_t bytes_written;
49 uint64_t cmd_get;
50 uint64_t cmd_set;
51 uint64_t evictions;
52 uint64_t get_hits;
53 uint64_t get_misses;
54 uint64_t limit_maxbytes;
55 char version[MEMCACHED_VERSION_STRING_LENGTH];
56 };
57
58 LIBMEMCACHED_API
59 void memcached_stat_free(memcached_st *, memcached_stat_st *);
60 LIBMEMCACHED_API
61 memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_return *error);
62 LIBMEMCACHED_API
63 memcached_return memcached_stat_servername(memcached_stat_st *memc_stat, char *args,
64 char *hostname, unsigned int port);
65 LIBMEMCACHED_API
66 char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *memc_stat,
67 const char *key, memcached_return *error);
68 LIBMEMCACHED_API
69 char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *memc_stat,
70 memcached_return *error);
71
72 #ifdef __cplusplus
73 }
74 #endif
75
76 #endif /* LIBMEMCACHED_MEMCACHED_STATS_H */