INNER CODE UNIT · Python

parse_args

bitpoke/mysql-operator · hack/development/stress_test.py:98

def parse_args():
    parser = argparse.ArgumentParser(description='Stress test for mysql.')
    parser.add_argument('DSN', type=str,
                        help='Data source name that contains user and password.')
    parser.add_argument('--rows', type=int, default=100000, help='The number of rows to execute')
    parser.add_argument('--times', type=int, default=100,
                        help='The number of times to execute the queries')

    return parser.parse_args()


def main():
    args = parse_args()
    db = mysql_connection(args.DSN)

    # run insert stress tests
    InsertStress(db, args)()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…