Created
July 1, 2017 17:32
-
-
Save vedgar/1975ab63dd67b94308ce170f0a5f46c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| bandwidth_totals, server_counter = Counter(), Counter() | |
| if server is None: | |
| for entry in daily_log: | |
| items = entry.split() | |
| server_name, bandwidth = items[1], items[15] | |
| if bandwidth != 'NULL': # ignore older logs that don't have current format | |
| bandwidth_totals[server_name] += int(bandwidth) | |
| server_counter[server_name] += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment