Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Add support to use the metrics DB for bandwidth calculations #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calum-github
Copy link
Contributor

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

- 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. This is the default method. 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.
@erikng
Copy link
Owner

erikng commented May 17, 2017

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.

@calum-github
Copy link
Contributor Author

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

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants