Add function to retain values in benchmarks