locks and made the operation stat parsing generic/not hard coded

@imlucas 

removed the hardcoded parsing of operation stats
also included lock fields of 'r', 'R', 'w', 'W'
also made the test cases for operations stats more diverse