cvs commit: p5ee/App-Options/benchmark run

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     04/12/02 13:50:17

  Added:       App-Options/benchmark run
  Log:
  new
  
  Revision  Changes    Path
  1.1                  p5ee/App-Options/benchmark/run
  
  Index: run
  ===================================================================
  #!/usr/local/bin/perl
  
  use lib "../lib";
  use App::Options qw(:none);
  use Benchmark qw(:all) ;
  chdir("../t");
  
  #######################################################################
  # The purpose of this benchmark file is to understand how long it
  # takes to parse a "typical" set of options.
  # I used the option file represented by the main regression test
  # suite in the "t" directory.
  #   Result: 196 parses/second, or ~ .005 seconds
  # This seems an acceptable overhead ;-) for the flexibility that
  # this module provides.
  #######################################################################
  
  sub baseline {
      my (%values);
      App::Options->init(values => \%values);
  }
  
  $count = 400;
  
  cmpthese($count, {
      'baseline' => \&baseline,
  });
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.