This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring over the tally script from #3807
- Loading branch information
1 parent
90441af
commit e8a572d
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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!' | ||
) |