diff options
author | Steve Yen <steve.yen@gmail.com> | 2009-03-25 12:16:01 -0700 |
---|---|---|
committer | Steve Yen <steve.yen@gmail.com> | 2009-03-25 12:16:01 -0700 |
commit | 7dda2c4301b47a0b02d094bbfdeeb77cf01e76ff (patch) | |
tree | 3427b1b47eefe38cfc4a64e3d3b4e060e15f6bf0 /t/stats.t | |
parent | 45f4a130fa66da8000fef6b1a63a0ee1ac469472 (diff) | |
download | memcached-7dda2c4301b47a0b02d094bbfdeeb77cf01e76ff.tar.gz |
stats reset also clears cas_hits/badval/misses
Diffstat (limited to 't/stats.t')
-rwxr-xr-x | t/stats.t | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 74; +use Test::More tests => 89; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -152,3 +152,22 @@ is(1024, $settings->{'maxconns'}); is('NULL', $settings->{'domain_socket'}); is('on', $settings->{'evictions'}); is('yes', $settings->{'cas_enabled'}); + +print $sock "stats reset\r\n"; +is(scalar <$sock>, "RESET\r\n", "good stats reset"); + +my $stats = mem_stats($sock); +is(0, $stats->{'cmd_get'}); +is(0, $stats->{'cmd_set'}); +is(0, $stats->{'get_hits'}); +is(0, $stats->{'get_misses'}); +is(0, $stats->{'delete_misses'}); +is(0, $stats->{'delete_hits'}); +is(0, $stats->{'incr_misses'}); +is(0, $stats->{'incr_hits'}); +is(0, $stats->{'decr_misses'}); +is(0, $stats->{'decr_hits'}); +is(0, $stats->{'cas_misses'}); +is(0, $stats->{'cas_hits'}); +is(0, $stats->{'cas_badval'}); +is(0, $stats->{'evictions'}); |