Add benchmark annotations to the tests

This will affect total running times simce some tests will be run multiple
times but it allows precise becnhmarking.
This commit is contained in:
Matt Williams
2012-10-27 21:37:54 +01:00
parent 856cdca604
commit d6640f64d0
5 changed files with 15 additions and 5 deletions

View File

@ -61,7 +61,9 @@ void TestLowPassFilter::testExecute()
LowPassFilter< RawVolume<Density8>, RawVolume<Density8>, Density16 > lowPassfilter(&volData, reg, &resultVolume, reg, 5);
//Test the normal implementation
lowPassfilter.execute();
QBENCHMARK {
lowPassfilter.execute();
}
QCOMPARE(resultVolume.getVoxelAt(0,0,0), Density8(4));
QCOMPARE(resultVolume.getVoxelAt(1,1,1), Density8(21));
QCOMPARE(resultVolume.getVoxelAt(2,2,2), Density8(10));