Tools to help testing metrics
Helper to collect metrics during tests, and make assertions about them.