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

@ -67,7 +67,9 @@ void TestAmbientOcclusionGenerator::testExecute()
// Calculate the ambient occlusion values
IsVoxelTransparent isVoxelTransparent;
calculateAmbientOcclusion(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255, isVoxelTransparent);
QBENCHMARK {
calculateAmbientOcclusion(&volData, &ambientOcclusionResult, volData.getEnclosingRegion(), 32.0f, 255, isVoxelTransparent);
}
//Check the results by sampling along a line though the centre of the volume. Because
//of the two walls we added, samples in the middle are darker than those at the edge.