Fix benchmark function in tests for 0.2 API