Commit 6c2d38e1 authored by Guido van Rossum's avatar Guido van Rossum

Finish adding the -h option. (You never tried to run what you checked

in, right, Jeremy? :-)
parent f76cde1a
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
############################################################################## ##############################################################################
"""Trace file statistics analyzer. """Trace file statistics analyzer.
Usage: stats.py [-i interval] [-q] [-v] [-S] tracefile Usage: stats.py [-h] [-i interval] [-q] [-v] [-S] tracefile
-h: print histogram
-i: summarizing interval in minutes (default 15; max 60) -i: summarizing interval in minutes (default 15; max 60)
-q: quiet; don't print sommaries -q: quiet; don't print sommaries
-v: verbose; print each record -v: verbose; print each record
...@@ -65,7 +66,7 @@ def main(): ...@@ -65,7 +66,7 @@ def main():
print_histogram = 0 print_histogram = 0
interval = 900 # Every 15 minutes interval = 900 # Every 15 minutes
try: try:
opts, args = getopt.getopt(sys.argv[1:], "i:qvSh") opts, args = getopt.getopt(sys.argv[1:], "hi:qvSh")
except getopt.error, msg: except getopt.error, msg:
usage(msg) usage(msg)
return 2 return 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment