apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r545404 - in /apr/apr-util/trunk: include/apr_memcache.h memcache/apr_memcache.c
Date Fri, 08 Jun 2007 04:45:59 GMT
Author: pquerna
Date: Thu Jun  7 21:45:58 2007
New Revision: 545404

URL: http://svn.apache.org/viewvc?view=rev&rev=545404
Log:
Add additional stats fields to apr_memcache, added to memcached in version 1.2.2+

PR: 42329
Submitted By: Josh Rotenberg <joshrotenberg gmail.com>

Modified:
    apr/apr-util/trunk/include/apr_memcache.h
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/include/apr_memcache.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_memcache.h?view=diff&rev=545404&r1=545403&r2=545404
==============================================================================
--- apr/apr-util/trunk/include/apr_memcache.h (original)
+++ apr/apr-util/trunk/include/apr_memcache.h Thu Jun  7 21:45:58 2007
@@ -339,6 +339,8 @@
     apr_uint32_t uptime;
     /** current UNIX time according to the server */
     apr_time_t time;
+    /** The size of a pointer on the current machine */
+    apr_uint32_t pointer_size;
     /** Accumulated user time for this process */
     apr_time_t rusage_user;
     /** Accumulated system time for this process */
@@ -363,12 +365,17 @@
     apr_uint32_t get_hits;
     /** Number of items that have been requested and not found */
     apr_uint32_t get_misses;
+    /** Number of items removed from cache because they passed their
+        expiration time */
+    apr_uint64_t evictions;
     /** Total number of bytes read by this server */
     apr_uint64_t bytes_read;
     /** Total number of bytes sent by this server */
     apr_uint64_t bytes_written;
     /** Number of bytes this server is allowed to use for storage. */
     apr_uint32_t limit_maxbytes;
+    /** Number of threads the server is running (if built with threading) */
+    apr_uint32_t threads; 
 } apr_memcache_stats_t;
 
 /**

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?view=diff&rev=545404&r1=545403&r2=545404
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Thu Jun  7 21:45:58 2007
@@ -1388,6 +1388,9 @@
 #define STAT_version MS_STAT " version "
 #define STAT_version_LEN (sizeof(STAT_version)-1)
 
+#define STAT_pointer_size MS_STAT " pointer_size "
+#define STAT_pointer_size_LEN (sizeof(STAT_pointer_size)-1)
+
 #define STAT_rusage_user MS_STAT " rusage_user "
 #define STAT_rusage_user_LEN (sizeof(STAT_rusage_user)-1)
 
@@ -1424,6 +1427,9 @@
 #define STAT_get_misses MS_STAT " get_misses "
 #define STAT_get_misses_LEN (sizeof(STAT_get_misses)-1)
 
+#define STAT_evictions MS_STAT " evictions "
+#define STAT_evictions_LEN (sizeof(STAT_evictions)-1)
+
 #define STAT_bytes_read MS_STAT " bytes_read "
 #define STAT_bytes_read_LEN (sizeof(STAT_bytes_read)-1)
 
@@ -1433,6 +1439,8 @@
 #define STAT_limit_maxbytes MS_STAT " limit_maxbytes "
 #define STAT_limit_maxbytes_LEN (sizeof(STAT_limit_maxbytes)-1)
 
+#define STAT_threads MS_STAT " threads "
+#define STAT_threads_LEN (sizeof(STAT_threads)-1)
 
 static const char *stat_read_string(apr_pool_t *p, char *buf, int len)
 {
@@ -1523,6 +1531,7 @@
     mc_do_stat(version, str)
     else mc_do_stat(pid, uint32)
     else mc_do_stat(uptime, uint32)
+    else mc_do_stat(pointer_size, uint32)
     else mc_do_stat(time, time)
     else mc_do_stat(rusage_user, rtime)
     else mc_do_stat(rusage_system, rtime)
@@ -1536,9 +1545,11 @@
     else mc_do_stat(cmd_set, uint32)
     else mc_do_stat(get_hits, uint32)
     else mc_do_stat(get_misses, uint32)
+    else mc_do_stat(evictions, uint64)
     else mc_do_stat(bytes_read, uint64)
     else mc_do_stat(bytes_written, uint64)
     else mc_do_stat(limit_maxbytes, uint32)
+    else mc_do_stat(threads, uint32)
 }
 
 APR_DECLARE(apr_status_t)



Mime
View raw message