public function benchmark($iterations = 10000, $inputSize = null)
    {
        $set = new BenchmarkResultsSet($iterations, $inputSize);
        $this->resultsGroup->addSet($set);

        foreach ($this->getSamplersForInputSize($inputSize) as $name => $func) {
            $actualIterations = $this->getActualIterations($name, $iterations, $inputSize);

            $start = microtime(true);
            for ($i = 0; $i < $actualIterations; $i++)
                $func();
            $time = microtime(true) - $start;

            $set->addBenchmark(new Benchmark($name, $time, $actualIterations));
        }

        return $this;
    }