projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated for custom hash functions/setting functions.
[awesomized/libmemcached]
/
libmemcached
/
analyze.c
diff --git
a/libmemcached/analyze.c
b/libmemcached/analyze.c
index 79ea17b96fcfe69248f2620017ea4d2fad4ce902..7dcbf8cb3bcc255b601a3bfbfbdb021b1c1809d8 100644
(file)
--- a/
libmemcached/analyze.c
+++ b/
libmemcached/analyze.c
@@
-67,10
+67,10
@@
memcached_analysis_st *memcached_analyze(memcached_st *memc,
uint64_t total_get_cmds= 0, total_get_hits= 0;
uint32_t server_count, x;
memcached_analysis_st *result;
uint64_t total_get_cmds= 0, total_get_hits= 0;
uint32_t server_count, x;
memcached_analysis_st *result;
-
+
*error= MEMCACHED_SUCCESS;
server_count= memcached_server_count(memc);
*error= MEMCACHED_SUCCESS;
server_count= memcached_server_count(memc);
- result= (memcached_analysis_st*)calloc(memc
->number_of_hosts
,
+ result= (memcached_analysis_st*)calloc(memc
ached_server_count(memc)
,
sizeof(memcached_analysis_st));
if (!result)
sizeof(memcached_analysis_st));
if (!result)
@@
-79,6
+79,8
@@
memcached_analysis_st *memcached_analyze(memcached_st *memc,
return NULL;
}
return NULL;
}
+ result->root= memc;
+
for (x= 0; x < server_count; x++)
{
calc_largest_consumption(result, x, memc_stat[x].bytes);
for (x= 0; x < server_count; x++)
{
calc_largest_consumption(result, x, memc_stat[x].bytes);
@@
-98,3
+100,8
@@
memcached_analysis_st *memcached_analyze(memcached_st *memc,
return result;
}
return result;
}
+
+void memcached_analyze_free(memcached_analysis_st *ptr)
+{
+ free(ptr);
+}