Permalink
Browse files

add name parameter in trace_start test script

  • Loading branch information...
1 parent 2cfd106 commit 47a4369ef3d65c6d355ab5a5b7ef78d329745e51 @nakagami committed Apr 9, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 misc/trace.py
View
@@ -20,16 +20,17 @@ def debug_print(msg):
def print_usage():
print(sys.argv[0] +
- ' start|stop <trc_id>|suspend <trc_id>|resume <trc_id>|list')
+ ' start [name]|stop <trc_id>|suspend <trc_id>|resume <trc_id>|list')
if len(sys.argv) < 2:
print_usage()
sys.exit(0)
svc = firebirdsql.service_mgr(host=HOST, user=USER, password=PASS)
if sys.argv[1] == 'start':
+ name = sys.argv[2] if len(sys.argv) == 3 else None
cfg = open('/opt/firebird/fbtrace.conf').read()
- svc.trace_start(cfg=cfg, callback=debug_print)
+ svc.trace_start(name=name, cfg=cfg, callback=debug_print)
elif sys.argv[1] == 'stop':
svc.trace_stop(id=sys.argv[2], callback=debug_print)
elif sys.argv[1] == 'suspend':

0 comments on commit 47a4369

Please sign in to comment.