summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2015-11-18 23:08:21 -0800
committerdormando <dormando@rydia.net>2015-11-18 23:08:21 -0800
commit8d2b5b4810baf570c0b2e903b5bdce3b3f23c8c9 (patch)
treedf3819a2e7ffa452dadc0a0f0a31cbe119822413
parenta1f269ee67fdb23a9b972dae8e99d15beabc37f9 (diff)
downloadmemcached-8d2b5b4810baf570c0b2e903b5bdce3b3f23c8c9.tar.gz
minor fixes and docs for listen_disabled timer
add a handful of missing stats docs (doh) and shorted the STATS_LOCK a little bit. the rest seems fine.
-rw-r--r--doc/protocol.txt6
-rw-r--r--memcached.c2
-rwxr-xr-xt/binary.t2
-rwxr-xr-xt/stats.t2
4 files changed, 9 insertions, 3 deletions
diff --git a/doc/protocol.txt b/doc/protocol.txt
index a34a217..ed4875c 100644
--- a/doc/protocol.txt
+++ b/doc/protocol.txt
@@ -527,6 +527,7 @@ integers separated by a colon (treat this as a floating point number).
| curr_connections | 32u | Number of open connections |
| total_connections | 32u | Total number of connections opened since |
| | | the server started running |
+| rejected_connections | 64u | Conns rejected in maxconns_fast mode |
| connection_structures | 32u | Number of connection structures allocated |
| | | by the server |
| reserved_fds | 32u | Number of misc fds used internally |
@@ -566,6 +567,11 @@ integers separated by a colon (treat this as a floating point number).
| | | to network |
| limit_maxbytes | 32u | Number of bytes this server is allowed to |
| | | use for storage. |
+| accepting_conns | bool | Whether or not server is accepting conns |
+| listen_disabled_num | 64u | Number of times server has stopped |
+| | | accepting new connections (maxconns). |
+| time_in_listen_disabled_us |
+| | 64u | Number of microseconds in maxconns. |
| threads | 32u | Number of worker threads requested. |
| | | (see doc/threads.txt) |
| conn_yields | 64u | Number of times any connection yielded to |
diff --git a/memcached.c b/memcached.c
index 47d7430..1a9bfaf 100644
--- a/memcached.c
+++ b/memcached.c
@@ -3954,10 +3954,10 @@ void do_accept_new_conns(const bool do_accept) {
}
if (do_accept) {
- STATS_LOCK();
struct timeval maxconns_exited;
uint64_t elapsed_us;
gettimeofday(&maxconns_exited,NULL);
+ STATS_LOCK();
elapsed_us =
(maxconns_exited.tv_sec - stats.maxconns_entered.tv_sec) * 1000000
+ (maxconns_exited.tv_usec - stats.maxconns_entered.tv_usec);
diff --git a/t/binary.t b/t/binary.t
index ae28814..2cf3ea9 100755
--- a/t/binary.t
+++ b/t/binary.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 3639;
+use Test::More tests => 3651;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;
diff --git a/t/stats.t b/t/stats.t
index 81f780f..91df4d6 100755
--- a/t/stats.t
+++ b/t/stats.t
@@ -71,7 +71,7 @@ my $sock = $server->sock;
my $stats = mem_stats($sock);
# Test number of keys
-is(scalar(keys(%$stats)), 52, "53 stats values");
+is(scalar(keys(%$stats)), 53, "53 stats values");
# Test initial state
foreach my $key (qw(curr_items total_items bytes cmd_get cmd_set get_hits evictions get_misses