4a8128bd14fd1ab13cc0496d2c73e789615aec9c
[awesomized/libmemcached] / libmemcached / analyze.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: Generate a memcached_analysis_st
9 *
10 */
11
12 #ifndef __LIBMEMCACHED_ANALYZE_H__
13 #define __LIBMEMCACHED_ANALYZE_H__
14
15 struct memcached_analysis_st {
16 memcached_st *root;
17 uint32_t average_item_size;
18 uint32_t longest_uptime;
19 uint32_t least_free_server;
20 uint32_t most_consumed_server;
21 uint32_t oldest_server;
22 double pool_hit_ratio;
23 uint64_t most_used_bytes;
24 uint64_t least_remaining_bytes;
25 };
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 LIBMEMCACHED_API
32 memcached_analysis_st *memcached_analyze(memcached_st *memc,
33 memcached_stat_st *memc_stat,
34 memcached_return_t *error);
35
36 LIBMEMCACHED_API
37 void memcached_analyze_free(memcached_analysis_st *);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif /* __LIBMEMCACHED_ANALYZE_H__ */