pike.git / lib / modules / Tools.pmod / Shoot.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Tools.pmod/Shoot.pmod/module.pmod:24:      // This function runs the actual test, it is started in a sub-process from run.   void run_sub( Test test, int maximum_seconds, float overhead)   {    float tg=0.0;    int testntot=0;    int nloops = 0;    int norm;    for (;;nloops++)    { +  mixed context = 0; +  if (test->prepare) +  context = test->prepare();    int start_cpu = gethrvtime(); -  testntot += test->perform(); +  testntot += test->perform(context);    tg += (gethrvtime()-start_cpu) / 1000000.0;    if (tg >= maximum_seconds) break;    }       norm = (int)(testntot/tg);       string res = (test->present_n ?    test->present_n(testntot,nloops,tg,tg,1) :    format_big_number(norm)+"/s");   
pike.git/lib/modules/Tools.pmod/Shoot.pmod/module.pmod:83:       if( !(test_name = rtests[ test ]) )    error("Test %O is not a test\n", test);          Process.spawn_pike( ({"-e", sprintf("Tools.Shoot.run_sub( Tools.Shoot[%q](), %d, %f )",    test_name, maximum_seconds, overhead ) }),    (["stdout":fd->pipe()]));    return Standards.JSON.decode( fd->read() );   } -  +