perfmonitoring: add unit tests