Search notes:

Perl module Devel::NYTProf

#
#   First, execute
#       perl -d:NYTProf script.pl
#   then 
#       nytprofhtml
#
#   Finally, open generated report
#       nytprof\index.html
#
#
use warnings;
use strict;

use Time::HiRes qw(time sleep);

my $c     = 0;
my $cnt   = 0;
my $start = time;

while (time - 1 < $start) {
  $cnt ++;

  unless  ($cnt % 11) {

     if (a()) {
        b();
     }

  }
}

print "cnt: $cnt $c\n";

sub a {

   my $t  = time;
   my $r  = rand;

   my $rt = $t * $r;

   my $s  = sprintf("%s", $rt);

   if ($s =~ /42/) {
     return 1;
   }

   return 0;

}

sub b {
  sleep 0.001;
}
Github repository PerlModules, path: /Devel/NYTProf/script.pl
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107892, '18.220.70.133', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Devel/NYTProf/index(88): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78