code for benchmarking apps