From fab289bbe1bbb6b2038024483bf8cb41aa0295ad Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sun, 25 Nov 2007 13:23:31 -0800 Subject: [PATCH] Fixed output variables in rusage --- lib/memcached_stats.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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"))) -- 2.30.2