projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
This add AES support.
[m6w6/libmemcached]
/
libmemcached
/
analyze.cc
diff --git
a/libmemcached/analyze.cc
b/libmemcached/analyze.cc
index ec534a3b4c9f67467e5ed568f257a6a3d5c2bf6f..576b6a6b6037c4eac9b5e0ac21189583b9b44ec9 100644
(file)
--- a/
libmemcached/analyze.cc
+++ b/
libmemcached/analyze.cc
@@
-1,4
+1,4
@@
-#include
"common.h"
+#include
<libmemcached/common.h>
static void calc_largest_consumption(memcached_analysis_st *result,
const uint32_t server_num,
static void calc_largest_consumption(memcached_analysis_st *result,
const uint32_t server_num,
@@
-65,16
+65,17
@@
memcached_analysis_st *memcached_analyze(memcached_st *memc,
{
uint64_t total_items= 0, total_bytes= 0;
uint64_t total_get_cmds= 0, total_get_hits= 0;
{
uint64_t total_items= 0, total_bytes= 0;
uint64_t total_get_cmds= 0, total_get_hits= 0;
- uint32_t server_count, x;
- memcached_analysis_st *result;
+ uint32_t server_count;
if (not memc or not memc_stat)
if (not memc or not memc_stat)
+ {
return NULL;
return NULL;
+ }
*error= MEMCACHED_SUCCESS;
server_count= memcached_server_count(memc);
*error= MEMCACHED_SUCCESS;
server_count= memcached_server_count(memc);
- result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
- sizeof(memcached_analysis_st));
+
memcached_analysis_st *
result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
+
sizeof(memcached_analysis_st));
if (not result)
{
if (not result)
{
@@
-84,7
+85,7
@@
memcached_analysis_st *memcached_analyze(memcached_st *memc,
result->root= memc;
result->root= memc;
- for (x= 0; x < server_count; x++)
+ for (
uint32_t
x= 0; x < server_count; x++)
{
calc_largest_consumption(result, x, memc_stat[x].bytes);
calc_oldest_node(result, x, memc_stat[x].uptime);
{
calc_largest_consumption(result, x, memc_stat[x].bytes);
calc_oldest_node(result, x, memc_stat[x].uptime);