mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 16:25:30 +02:00
Added testing of IN(value-list)
Portability fixes Build-tools/Do-compile: Fix for Linux ia64 sql-bench/bench-init.pl.sh: Added help function time_fetch_all_rows sql-bench/test-insert.sh: Added testing of IN(value-list) sql/item_func.cc: Cleanup sql/mysqld.cc: Portability fix sql/stacktrace.c: Portability fix
This commit is contained in:
parent
62c3fe9b4b
commit
992e7da03a
6 changed files with 125 additions and 8 deletions
|
|
@ -31,7 +31,7 @@
|
|||
# $server Object for current server
|
||||
# $limits Hash reference to limits for benchmark
|
||||
|
||||
$benchmark_version="2.13";
|
||||
$benchmark_version="2.14";
|
||||
use Getopt::Long;
|
||||
|
||||
require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
|
||||
|
|
@ -294,6 +294,35 @@ sub do_query
|
|||
die "\nError executing '$query':\n$DBI::errstr\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Run a query X times
|
||||
#
|
||||
|
||||
sub time_fetch_all_rows
|
||||
{
|
||||
my($test_text,$result_text,$query,$dbh,$test_count)=@_;
|
||||
my($i,$loop_time,$end_time,$count,$rows,$estimated);
|
||||
|
||||
print $test_text . "\n" if (defined($test_text));
|
||||
$count=$rows=0;
|
||||
$loop_time=new Benchmark;
|
||||
for ($i=1 ; $i <= $test_count ; $i++)
|
||||
{
|
||||
$count++;
|
||||
$rows+=fetch_all_rows($dbh,$query) or die $DBI::errstr;
|
||||
$end_time=new Benchmark;
|
||||
last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i,
|
||||
$test_count));
|
||||
}
|
||||
$end_time=new Benchmark;
|
||||
if ($estimated)
|
||||
{ print "Estimated time"; }
|
||||
else
|
||||
{ print "Time"; }
|
||||
print " for $result_text ($count:$rows) " .
|
||||
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Handle estimated time of the server is too slow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue