added locking on benchmarks