Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Bring over the tally script from #3807
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Mar 30, 2016
1 parent 90441af commit e8a572d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tally-backfill.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function, unicode_literals

import commands


def title(title):
print(title)
print("-"*34)

def report(*patterns):
N = 0
for pattern in patterns:
n = int(commands.getoutput('grep "{}$" backfill.log | wc -l'.format(pattern)))
N += n
print("{:<28} {:>5}".format(pattern, n))
print("{:<28} {:>5}".format('', N))


report( 'IMPOSSIBLE!!!!!!!!!!!'
, 'all set!'
, 'yes'
, 'no'
, 'missing ref and status!'
, 'mismatched ref and status!'
, 'missing ref!'
, 'mismatched ref!'
, 'missing status!'
, 'mismatched status!'
)

0 comments on commit e8a572d

Please sign in to comment.