- Refactored for clarity and added async tick flush, wait on close till all flushes are complete
- Added SampledDuration()
- clean up tests to use httptest package