An attempt to count number of microseconds each lock is being waited on,
and held, as well as a function to dump the lock statistics.