Lines Matching full:foo*

10 use vars qw($foo $bar $baz $ballast);
39 isa_ok(timeit(5, sub {++$foo}), 'Benchmark', "timeit CODEREF");
40 is ($foo, 5, "benchmarked code was run 5 times");
132 $foo = 0;
134 my $got = timethis($iterations, sub {++$foo});
137 is ($foo, $iterations, "benchmarked code was run $iterations times");
155 $foo = 0;
157 $got = timethis($iterations, sub {++$foo}, $title);
160 is ($foo, $iterations, "benchmarked code was run $iterations times");
167 $foo = 0;
169 $got = timethis($iterations, sub {++$foo}, $title, 'nop');
172 is ($foo, $iterations, "benchmarked code was run $iterations times");
179 $foo = 0;
182 $got = timethis(-2, sub {$foo+= fib($ballast)}, $title, 'none');
187 ok ($foo > 0, "benchmarked code was run");
198 $foo = $bar = $baz = 0;
200 $got = timethese($iterations, { Foo => sub {++$foo}, Bar => '++$bar',
204 isa_ok($got->{Foo}, 'Benchmark', "Foo value");
207 eq_set([keys %$got], [qw(Foo Bar Baz)], 'should be exactly three objects');
208 is ($foo, $iterations, "Foo code was run $iterations times");
216 like ($got, qr/timing $iterations iterations of\s+Bar\W+Baz\W+Foo\W*?\.\.\./s,
232 $foo = 'bar';
233 $q = ${$foo} },
245 $foo = 'bar';
246 return ${$foo} },
258 my $code_to_test = { Foo => sub {$foo+=fib($ballast-2)},
263 $foo = $bar = 0;
271 isa_ok($results->{Foo}, 'Benchmark', "Foo value");
273 eq_set([keys %$results], [qw(Foo Bar)], 'should be exactly two objects');
274 ok ($foo > 0, "Foo code was run");
427 $foo = $bar = 0;
431 ok ($foo > 0, "Foo code was run");
437 like ($got, qr/timing 10 iterations of\s+Bar\W+Foo\W*?\.\.\./s,
447 $foo = $bar = 0;
451 ok ($foo > 0, "Foo code was run");
467 $foo = $bar = 0;
471 is ($foo, 0, "Foo code was not run");
481 $foo = $bar = 0;
485 is ($foo, 0, "Foo code was not run");
558 my %cmpthese = ('forgot {}' => 'cmpthese( 42, foo => sub { 1 } )',
560 'array ref' => 'cmpthese( 42, [ foo => sub { 1 } ] )',
567 my %timethese = ('forgot {}' => 'timethese( 42, foo => sub { 1 } )',
569 'array ref' => 'timethese( 42, [ foo => sub { 1 } ] )',