+
+parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
+ description='Process systemd profiling information',
+ epilog='''\
+time - print time spent in the kernel before reaching userspace
+blame - print list of running units ordered by time to init
+plot - output SVG graphic showing service initialization
+''')
+
+parser.add_argument('action', choices=('time', 'blame', 'plot'),
+ default='time', nargs='?',
+ help='action to perform (default: time)')
+parser.add_argument('--user', action='store_true',
+ help='use the session bus')
+
+args = parser.parse_args()
+
+if args.user:
+ bus = Gio.BusType.SESSION