Changeset 819

Show
Ignore:
Timestamp:
08/29/09 01:55:28 (3 months ago)
Author:
athomason
Message:

"stats malloc" command is gone in 1.4

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/api/perl/t/03_stats.t

    r605 r819  
    1717 
    1818if ($msock) { 
    19     plan tests => 24 + scalar(@misc_stats_keys); 
     19    plan tests => 16 + scalar(@misc_stats_keys); 
    2020} else { 
    2121    plan skip_all => "No memcached instance running at $testaddr\n"; 
     
    4242       "misc stats hosts $testaddr misc contains $stat_key"); 
    4343} 
    44  
    45 my $got_malloc = 0; 
    46 foreach my $stat_key (keys %{$misc_stats->{'total'}}) { 
    47     if ($stat_key =~ /^malloc/) { 
    48         $got_malloc = 1; 
    49         last; 
    50     } 
    51 } 
    52 ok(! $got_malloc, 'no malloc stats in misc stats'); 
    53  
    54 my $malloc_stats = $memd->stats('malloc'); 
    55 ok($malloc_stats, 'got malloc stats'); 
    56 isa_ok($malloc_stats, 'HASH', 'malloc stats'); 
    57 isa_ok($malloc_stats->{'total'}, 'HASH', 'malloc stats total'); 
    58 isa_ok($misc_stats->{'hosts'}, 'HASH', 'malloc stats hosts'); 
    59 isa_ok($misc_stats->{'hosts'}{$testaddr}, 'HASH', 
    60        "malloc stats host $testaddr"); 
    61  
    62 $got_malloc = 0; 
    63 foreach my $stat_key (keys %{$malloc_stats->{'total'}}) { 
    64     if ($stat_key =~ /^malloc/) { 
    65         $got_malloc = 1; 
    66         last; 
    67     } 
    68 } 
    69 ok($got_malloc, 'malloc stats in malloc stats'); 
    70  
    71 my $got_misc = 0; 
    72 foreach my $stat_key (@misc_stats_keys) { 
    73     if (exists $malloc_stats->{'total'}{$stat_key}) { 
    74         $got_misc = 1; 
    75         last; 
    76     } 
    77 } 
    78 ok(! $got_misc, 'no misc stats in malloc stats');