blib/script/profile.pl untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 41 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #
2 # $ perl -d:NYTProf script/profile.pl
3 # $ ntyprofhtml
4 #
5 use strict;
6 use warnings;
7 use lib 'lib';
8 use t::Util;
9 use File::Spec;
10 use Test::mysqld;
11  
12 use DBIx::QueryLog ();
13  
14 local $SIG{INT} = sub { exit 1 };
15  
16 my $mysqld = t::Util->setup_mysqld;
17 my $dbh = DBI->connect(
18 $mysqld->dsn(dbname => 'mysql'), '', '',
19 {
20 AutoCommit => 1,
21 RaiseError => 1,
22 },
23 ) or die $DBI::errstr;
24  
25 local *STDERR;
26 open STDERR, '>', File::Spec->devnull or die $!;
27  
28 DBIx::QueryLog->begin;
29  
30 for (1..1000) {
31 $dbh->do('SELECT * FROM user WHERE User = ?', undef, 'root');
32 }