Better bench api

More flexible API to write benchmarks.