pike.git / lib / modules / Tools.pmod / Standalone.pmod / benchmark.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/benchmark.pike:1: - // $Id: benchmark.pike,v 1.6 2003/08/24 21:00:35 nilsson Exp $ + // $Id: benchmark.pike,v 1.7 2004/07/08 15:36:42 grubba Exp $      #pike __REAL_VERSION__      constant description = "Runs some built in Pike benchmarks.";   constant help = #"   Benchmarks Pike with %d built in benchmark tests.   Arguments:      -h, --help    Shows this help text.
pike.git/lib/modules/Tools.pmod/Standalone.pmod/benchmark.pike:19:      -t<glob>[,<glob>...], --tests=<glob>[,<glob>...]    Only run the specified tests.   ";      int(0..) main(int num, array(string) args)   {    mapping(string:Tools.Shoot.Test) tests=([]);    array results=({});    -  foreach (indices(Tools.Shoot);;string test) +  foreach (indices(Tools.Shoot),string test)    {    program p;    Tools.Shoot.Test t;    if ((programp(p=Tools.Shoot[test])) &&    (t=p())->perform)    tests[test]=t;    }       int seconds_per_test = 5;    int maximum_runs = 25;