Skip to content

Commit

Permalink
Added argparse --nof argument
Browse files Browse the repository at this point in the history
  • Loading branch information
serputko committed Sep 15, 2017
1 parent 058b6a2 commit 2c64be7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def show_top_n_popular_transactions(self, n):
parser = argparse.ArgumentParser()
parser.add_argument('--path', nargs='?', type=str, help="path to log file to parse",
default='./data/test_task_2_logs.log')
parser.add_argument('--nof', nargs='?', type=int, help="number of transactions to display",
default=25)
args = parser.parse_args()
p = Parser(args.path)
p.show_rpm_for_all_transactions()
p.show_top_n_popular_transactions(25)
p.show_top_n_popular_transactions(args.nof)

0 comments on commit 2c64be7

Please sign in to comment.