diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-04-07 10:12:52 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-04-07 10:12:52 +0200 |
commit | c0bdb2097939cf21da0a01ea5bf0907ba29b7933 (patch) | |
tree | b441876df9257ee1f400a75dcd9a27064b7f4e3b /mysql-test/lib/mtr_misc.pl | |
parent | cda1dc52c2c8f7305246ea0d5e5885dc99a704e3 (diff) | |
download | mariadb-git-c0bdb2097939cf21da0a01ea5bf0907ba29b7933.tar.gz |
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'
Diffstat (limited to 'mysql-test/lib/mtr_misc.pl')
-rw-r--r-- | mysql-test/lib/mtr_misc.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index 678d3829226..a7b5afd9fd7 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -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]); |