Add option to collect lock statistics.