Changeset 34529 for platform/mysql

Show
Ignore:
Timestamp:
07/22/09 10:41:06 (5 years ago)
Author:
kazuho
Message:

chage default interval, fix bugs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/mysql/mprofile/trunk/mpdump

    r34528 r34529  
    99use Time::HiRes qw(sleep); 
    1010 
    11 my $dbi = 'DBI:mysql:database=mysql;user=root'; 
     11my $dbi = 'DBI:mysql(mysql_enable_utf8=>1):database=mysql;user=root'; 
    1212my $samples = 1000; 
    13 my $interval = 0.05; 
     13my $interval = 0.1; 
    1414 
    1515GetOptions( 
    1616    'dbi=s'      => \$dbi, 
    17     'interval=i' => \$interval, 
     17    'interval=f' => \$interval, 
    1818    'samples=i'  => \$samples, 
    1919) or exit 1; 
     
    2828    ) or die $dbh->errstr; 
    2929    print to_json([ grep { 
    30         $_->{Command} eq 'Query' and $_->{Info} ne 'SHOW FULL PROCESSLIST' 
     30        ($_->{Command} || '') eq 'Query' and $_->{Info} ne 'SHOW FULL PROCESSLIST' 
    3131    } @$rows ]), "\n"; 
    3232    sleep($interval);