From 4f541c5f4354a6d48d4a04655fd1bc72238f8205 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 10 Oct 2018 17:27:17 +0300 Subject: [PATCH] Added timing of bootstrap to mtr --- mysql-test/mysql-test-run.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b783d815222..b85058b3c94 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -102,6 +102,7 @@ use mtr_unique; use mtr_results; use IO::Socket::INET; use IO::Select; +use Time::HiRes qw(gettimeofday); require "mtr_process.pl"; require "mtr_io.pl"; @@ -3285,6 +3286,7 @@ sub mysql_install_db { # Create directories mysql and test mkpath("$install_datadir/mysql"); + my $realtime= gettimeofday(); if ( My::SafeProcess->run ( name => "bootstrap", @@ -3302,6 +3304,10 @@ sub mysql_install_db { "Could not install system database from $bootstrap_sql_file\n" . "The $path_bootstrap_log file contains:\n$data\n"); } + else + { + mtr_verbose("Spent " . sprintf("%.3f", (gettimeofday() - $realtime)) . " seconds in bootstrap"); + } }