Cacher icon indicating copy to clipboard operation
Cacher copied to clipboard

Add support to use the metrics DB for bandwidth calculations

Open calum-github opened this issue 8 years ago • 2 comments

  • 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.

calum-github avatar Mar 09 '17 06:03 calum-github

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.

erikng avatar May 17 '17 14:05 erikng

Cool, good ideas I'll jump on to it asap

Cheers!

calum-github avatar May 18 '17 07:05 calum-github