subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1489855 - in /subversion/trunk/subversion/libsvn_subr: cache-membuffer.c cache-memcache.c cache.c
Date Wed, 05 Jun 2013 13:27:17 GMT
Author: stefan2
Date: Wed Jun  5 13:27:17 2013
New Revision: 1489855

URL: http://svn.apache.org/r1489855
Log:
Minor simplification of the cache stats code.  Clear the aggregated
stats strcut before passing it on to the specific implementatations.

* subversion/libsvn_subr/cache.c
  (svn_cache__get_info): clear all stats before filling them

* subversion/libsvn_subr/cache-membuffer.c
  (svn_membuffer_cache_get_info): simplify

* subversion/libsvn_subr/cache-memcache.c
  (memcache_get_info): simplify

Modified:
    subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
    subversion/trunk/subversion/libsvn_subr/cache-memcache.c
    subversion/trunk/subversion/libsvn_subr/cache.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1489855&r1=1489854&r2=1489855&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Wed Jun  5 13:27:17 2013
@@ -2458,13 +2458,6 @@ svn_membuffer_cache_get_info(void *cache
 
   /* collect info from shared cache back-end */
 
-  info->data_size = 0;
-  info->used_size = 0;
-  info->total_size = 0;
-
-  info->used_entries = 0;
-  info->total_entries = 0;
-
   for (i = 0; i < cache->membuffer->segment_count; ++i)
     {
       svn_membuffer_t *segment = cache->membuffer + i;

Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-memcache.c?rev=1489855&r1=1489854&r2=1489855&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-memcache.c Wed Jun  5 13:27:17 2013
@@ -366,12 +366,6 @@ memcache_get_info(void *cache_void,
 
   /* we don't have any memory allocation info */
 
-  info->used_size = 0;
-  info->total_size = 0;
-  info->data_size = 0;
-  info->used_entries = 0;
-  info->total_entries = 0;
-
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/libsvn_subr/cache.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache.c?rev=1489855&r1=1489854&r2=1489855&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache.c Wed Jun  5 13:27:17 2013
@@ -192,6 +192,7 @@ svn_cache__get_info(svn_cache__t *cache,
 {
   /* write general statistics */
 
+  memset(info, 0, sizeof(*info));
   info->gets = cache->reads;
   info->hits = cache->hits;
   info->sets = cache->writes;



Mime
View raw message