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);
- result= (memcached_analysis_st*)calloc(memc->number_of_hosts,
+ result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
sizeof(memcached_analysis_st));
if (!result)
return NULL;
}
+ result->root= memc;
+
for (x= 0; x < server_count; x++)
{
calc_largest_consumption(result, x, memc_stat[x].bytes);
return result;
}
+
+void memcached_analyze_free(memcached_analysis_st *ptr)
+{
+ free(ptr);
+}