summaryrefslogtreecommitdiff
path: root/globals.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-06-27 16:26:40 -0700
committerdormando <dormando@rydia.net>2016-06-27 16:26:40 -0700
commitcb01d5044d370e2426fddde5bb0e5404b8e7deb0 (patch)
tree061f31b6c4d9b0e661ec421f68132f8f8c9b0fda /globals.c
parent80ce01080d1fa1a6e7205c5025fb1c39e5110751 (diff)
downloadmemcached-cb01d5044d370e2426fddde5bb0e5404b8e7deb0.tar.gz
clean up global stats code a little.
tons of stats were left in the global stats structure that're no longer used, and it looks like we kept accidentally adding new ones in there. There's also an unused mutex. Split global stats into `stats` and `stats_state`. initialize via memset, reset only `stats` via memset, removing several places where stats values get repeated. Looks much cleaner and should be less error prone.
Diffstat (limited to 'globals.c')
-rw-r--r--globals.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/globals.c b/globals.c
index a01e370..1a6d04c 100644
--- a/globals.c
+++ b/globals.c
@@ -20,6 +20,7 @@ volatile rel_time_t current_time;
/** exported globals **/
struct stats stats;
+struct stats_state stats_state;
struct settings settings;
struct slab_rebalance slab_rebal;
volatile int slab_rebalance_signal;