@classmethod
    def main(cls):

        parser = argparse.ArgumentParser("python -m examples.performance")

        if cls.name is None:
            parser.add_argument(
                "name", choices=cls._suite_names(), help="suite to run")

            if 1 > len(sys.argv):
                potential_name = sys.argv[1]
                try:
                    suite = __import__(__name__ + "." + potential_name)
                except ImportError:
                    pass

        parser.add_argument(
            "--test", type=str,
            help="run specific test name"
        )

        parser.add_argument(
            '--dburl', type=str, default="sqlite:///profile.db",
            help="database URL, default sqlite:///profile.db"
        )
        parser.add_argument(
            '--num', type=int, default=cls.num,
            help="Number of iterations/items/etc for tests; "
                 "default is %d module-specific" % cls.num
        )
        parser.add_argument(
            '--profile', action='store_true',
            help='run profiling and dump call counts')
        parser.add_argument(
            '--dump', action='store_true',
            help='dump full call profile (implies --profile)')
        parser.add_argument(
            '--callers', action='store_true',
            help='print callers as well (implies --dump)')
        parser.add_argument(
            '--runsnake', action='store_true',
            help='invoke runsnakerun (implies --profile)')
        parser.add_argument(
            '--echo', action='store_true',
            help="Echo SQL output")
        args = parser.parse_args()

        args.dump = args.dump or args.callers
        args.profile = args.profile or args.dump or args.runsnake

        if cls.name is None:
            suite = __import__(__name__ + "." + args.name)

        Profiler(args).run()
dataset/ETHPy150Open zzzeek/sqlalchemy/examples/performance/__init__.py/Profiler.main/swapped operands of `>`