mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Improve report on test execution time
Define tot_real_tim locally in mtr_report.pl mysql-test/mysql-test-run.pl: Move global variable to local scope in the file it's being used
This commit is contained in:
@ -38,6 +38,9 @@ sub mtr_child_error (@);
|
|||||||
sub mtr_debug (@);
|
sub mtr_debug (@);
|
||||||
sub mtr_verbose (@);
|
sub mtr_verbose (@);
|
||||||
|
|
||||||
|
my $tot_real_time= 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -142,7 +145,7 @@ sub mtr_report_test_passed ($) {
|
|||||||
if ( $::opt_timer and -f "$::opt_vardir/log/timer" )
|
if ( $::opt_timer and -f "$::opt_vardir/log/timer" )
|
||||||
{
|
{
|
||||||
$timer= mtr_fromfile("$::opt_vardir/log/timer");
|
$timer= mtr_fromfile("$::opt_vardir/log/timer");
|
||||||
$::glob_tot_real_time += ($timer/1000);
|
$tot_real_time += ($timer/1000);
|
||||||
$timer= sprintf "%12s", $timer;
|
$timer= sprintf "%12s", $timer;
|
||||||
}
|
}
|
||||||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||||
@ -243,8 +246,10 @@ sub mtr_report_stats ($) {
|
|||||||
|
|
||||||
if ( $::opt_timer )
|
if ( $::opt_timer )
|
||||||
{
|
{
|
||||||
print
|
use English;
|
||||||
"Spent $::glob_tot_real_time seconds actually executing testcases\n"
|
|
||||||
|
mtr_report("Spent", sprintf("%.3f", $tot_real_time),"of",
|
||||||
|
time - $BASETIME, "seconds executing testcases");
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
@ -307,7 +307,6 @@ our @data_dir_lst;
|
|||||||
our $used_binlog_format;
|
our $used_binlog_format;
|
||||||
our $used_default_engine;
|
our $used_default_engine;
|
||||||
our $debug_compiled_binaries;
|
our $debug_compiled_binaries;
|
||||||
our $glob_tot_real_time= 0;
|
|
||||||
|
|
||||||
our %mysqld_variables;
|
our %mysqld_variables;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user