Cacher
Cacher copied to clipboard
Add support to use the metrics DB for bandwidth calculations
-
Use the Metrics sqlite DB to calculate bandwidth this seems to be the most accurate method to get statistics about how much data the caching server has served. I've made this the default method instead of scraping the logs. To change to the previous method of scraping the logs, use option
--measurement logs -
Changed the method of converting bytes to KB and MB to use decimal instead of base 2 - as per KB from Apple which indicates decimal should be used on macOS (https://support.apple.com/en-us/HT201402)
-
Adjust wording to remove 'yesterday' and instead insert the target date.
I will merge if you can do the following:
- change --measurement to --logs
- add logic where if --logs isn't passed but there isn't a metrics.db to warn the admin but proceed to use the logs vs failing.
Cool, good ideas I'll jump on to it asap
Cheers!