implement keys-per-minute computing function.
merged master into watch-config