List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:April 1 2011 12:52pm
Subject:bzr commit into mysql-5.5-mtr branch (bjorn.munch:3192) Bug#12316050
View as plain text  
#At file:///home/bm136801/my/initrep-55/ based on revid:bjorn.munch@stripped

 3192 Bjorn Munch	2011-04-01
      Bug #12316050 MTR: --REPORT-TIMES GIVES TOO HIGH NUMBER FOR INITIALIZATION
      Forgot that the main thread would be idle while waiting for tests
      Added sub mark_time_idle() so ignore time spent waiting
      Also added a new time category 'admin' to take some of 'init'

    modified:
      mysql-test/lib/mtr_misc.pl
      mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/lib/mtr_misc.pl'
--- a/mysql-test/lib/mtr_misc.pl	2011-01-18 10:21:37 +0000
+++ b/mysql-test/lib/mtr_misc.pl	2011-04-01 12:50:22 +0000
@@ -36,6 +36,7 @@ sub start_timer($);
 sub has_expired($);
 sub init_timers();
 sub mark_time_used($);
+sub mark_time_idle();
 sub add_total_times($);
 sub print_times_used($$);
 sub print_total_times($);
@@ -224,6 +225,7 @@ my %time_used= (
   'ch-warn' => 0,
   'test'    => 0,
   'init'    => 0,
+  'admin'   => 0,
 );
 
 my %time_text= (
@@ -232,7 +234,8 @@ my %time_text= (
  'check'   => "Check-testcase",
  'ch-warn' => "Check for warnings",
  'test'    => "Test execution",
- 'init'    => "Initialization etc.",
+ 'init'    => "Initialization/cleanup",
+ 'admin'   => "Test administration",
 );
 
 # Counts number of reports from workers
@@ -255,6 +258,10 @@ sub mark_time_used($) {
   $last_timer_set= $curr_time;
 }
 
+sub mark_time_idle() {
+  $last_timer_set= gettimeofday() if $opt_report_times;
+}
+
 sub add_total_times($) {
   my ($dummy, $num, @line)= split (" ", $_[0]);
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-03-16 14:11:20 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-04-01 12:50:22 +0000
@@ -546,7 +546,9 @@ sub run_test_server ($$$) {
   my $s= IO::Select->new();
   $s->add($server);
   while (1) {
+    mark_time_used('admin');
     my @ready = $s->can_read(1); # Wake up once every second
+    mark_time_idle();
     foreach my $sock (@ready) {
       if ($sock == $server) {
 	# New client connected
@@ -888,7 +890,7 @@ sub run_worker ($) {
       if ( $opt_gprof ) {
 	gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
       }
-      mark_time_used('init');
+      mark_time_used('admin');
       print_times_used($server, $thread_num);
       exit($valgrind_reports);
     }
@@ -3762,7 +3764,7 @@ sub run_testcase ($) {
 
   do_before_run_mysqltest($tinfo);
 
-  mark_time_used('init');
+  mark_time_used('admin');
 
   if ( $opt_check_testcases and check_testcase($tinfo, "before") ){
     # Failed to record state of server or server crashed
@@ -5232,7 +5234,7 @@ sub start_mysqltest ($) {
   my $exe= $exe_mysqltest;
   my $args;
 
-  mark_time_used('init');
+  mark_time_used('admin');
 
   mtr_init_args(\$args);
 


Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20110401125022-0i6krxjrgp8k1d8h.bundle
Thread
bzr commit into mysql-5.5-mtr branch (bjorn.munch:3192) Bug#12316050Bjorn Munch1 Apr