From: Brian Aker Date: Sun, 25 Nov 2007 21:23:31 +0000 (-0800) Subject: Fixed output variables in rusage X-Git-Tag: _11~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fab289bbe1bbb6b2038024483bf8cb41aa0295ad;p=m6w6%2Flibmemcached Fixed output variables in rusage --- diff --git a/lib/memcached_stats.c b/lib/memcached_stats.c index 43574be5..aea66875 100644 --- a/lib/memcached_stats.c +++ b/lib/memcached_stats.c @@ -153,14 +153,10 @@ char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, 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")))