Skip to content

Commit

Permalink
Hotfix for #13 - setUp/tearDown before each method run
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Nov 10, 2013
1 parent c58a243 commit 43fcde8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Athletic/AthleticEvent.php
Expand Up @@ -93,9 +93,7 @@ private function runBenchmarks($methods)

foreach ($methods as $methodName => $annotations) {
if (isset($annotations['iterations']) === true) {
$this->setUp();
$results[] = $this->runMethodBenchmark($methodName, $annotations);
$this->tearDown();
}
}
return $results;
Expand All @@ -115,7 +113,9 @@ private function runMethodBenchmark($method, $annotations)

$results = array();
for ($i = 0; $i < $iterations; ++$i) {
$this->setUp();
$results[$i] = $this->timeMethod($method) - $avgCalibration;
$this->tearDown();
}

$finalResults = $this->methodResultsFactory->create($method, $results, $iterations);
Expand Down

0 comments on commit 43fcde8

Please sign in to comment.