Commit 4f541c5f authored by Monty's avatar Monty

Added timing of bootstrap to mtr

parent 5280af2b
...@@ -102,6 +102,7 @@ use mtr_unique; ...@@ -102,6 +102,7 @@ use mtr_unique;
use mtr_results; use mtr_results;
use IO::Socket::INET; use IO::Socket::INET;
use IO::Select; use IO::Select;
use Time::HiRes qw(gettimeofday);
require "mtr_process.pl"; require "mtr_process.pl";
require "mtr_io.pl"; require "mtr_io.pl";
...@@ -3285,6 +3286,7 @@ sub mysql_install_db { ...@@ -3285,6 +3286,7 @@ sub mysql_install_db {
# Create directories mysql and test # Create directories mysql and test
mkpath("$install_datadir/mysql"); mkpath("$install_datadir/mysql");
my $realtime= gettimeofday();
if ( My::SafeProcess->run if ( My::SafeProcess->run
( (
name => "bootstrap", name => "bootstrap",
...@@ -3302,6 +3304,10 @@ sub mysql_install_db { ...@@ -3302,6 +3304,10 @@ sub mysql_install_db {
"Could not install system database from $bootstrap_sql_file\n" . "Could not install system database from $bootstrap_sql_file\n" .
"The $path_bootstrap_log file contains:\n$data\n"); "The $path_bootstrap_log file contains:\n$data\n");
} }
else
{
mtr_verbose("Spent " . sprintf("%.3f", (gettimeofday() - $realtime)) . " seconds in bootstrap");
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment