}
else if (!memcmp("connection_structures", key, strlen("connection_structures")))
{
- //stat->connection_structures= strtol(value, (char **)NULL, 10);
+ stat->connection_structures= strtol(value, (char **)NULL, 10);
}
else if (!memcmp("cmd_get", key, strlen("cmd_get")))
{
- //stat->cmd_get= strtoll(value, (char **)NULL, 10);
+ stat->cmd_get= strtoll(value, (char **)NULL, 10);
}
else if (!memcmp("cmd_set", key, strlen("cmd_set")))
{
- //stat->cmd_set= strtoll(value, (char **)NULL, 10);
+ stat->cmd_set= strtoll(value, (char **)NULL, 10);
}
else if (!memcmp("get_hits", key, strlen("get_hits")))
{
- //stat->get_hits= strtoll(value, (char **)NULL, 10);
+ stat->get_hits= strtoll(value, (char **)NULL, 10);
}
else if (!memcmp("get_misses", key, strlen("get_misses")))
{
- //stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
+ stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
}
else if (!memcmp("evictions", key, strlen("evictions")))
{
- //stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
+ stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
}
else if (!memcmp("bytes_read", key, strlen("bytes_read")))
{
}
else if (!memcmp("limit_maxbytes", key, strlen("limit_maxbytes")))
{
- //stat->limit_maxbytes= strtol(value, (char **)NULL, 10);
+ stat->limit_maxbytes= strtol(value, (char **)NULL, 10);
}
else if (!memcmp("threads", key, strlen("threads")))
{
snprintf(buffer, SMALL_STRING_LEN,"%s", stat->version);
else if (!memcmp("pointer_size", key, strlen("pointer_size")))
snprintf(buffer, SMALL_STRING_LEN,"%u", stat->pointer_size);
- else if (!memcmp("rusage_user_seconds", key, strlen("rusage_user_seconds")))
- snprintf(buffer, SMALL_STRING_LEN,"%u", stat->rusage_user_seconds);
- else if (!memcmp("rusage_user_microseconds", key, strlen("rusage_user_microseconds")))
- snprintf(buffer, SMALL_STRING_LEN,"%u", stat->rusage_user_microseconds);
- else if (!memcmp("rusage_system_seconds", key, strlen("rusage_system_seconds")))
- snprintf(buffer, SMALL_STRING_LEN,"%u", stat->rusage_system_seconds);
- else if (!memcmp("rusage_system_microseconds", key, strlen("rusage_system_microseconds")))
- snprintf(buffer, SMALL_STRING_LEN,"%u", stat->rusage_system_microseconds);
+ else if (!memcmp("rusage_user", key, strlen("rusage_user")))
+ snprintf(buffer, SMALL_STRING_LEN,"%u.%u", stat->rusage_user_seconds, stat->rusage_user_microseconds);
+ else if (!memcmp("rusage_system", key, strlen("rusage_system")))
+ snprintf(buffer, SMALL_STRING_LEN,"%u.%u", stat->rusage_system_seconds, stat->rusage_system_microseconds);
else if (!memcmp("curr_items", key, strlen("curr_items")))
snprintf(buffer, SMALL_STRING_LEN,"%u", stat->curr_items);
else if (!memcmp("total_items", key, strlen("total_items")))
free(stats);
return NULL;
}
- memset(stats, 0, sizeof(memcached_st)*(ptr->number_of_hosts));
+ memset(stats, 0, sizeof(memcached_stat_st)*(ptr->number_of_hosts));
rc= MEMCACHED_SUCCESS;
for (x= 0; x < ptr->number_of_hosts; x++)