File: bench_init.py

package info (click to toggle)
mariadb-connector-python 1.1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 812 kB
  • sloc: python: 6,099; ansic: 4,896; sh: 23; makefile: 14
file content (23 lines) | stat: -rw-r--r-- 423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3 -O
# -*- coding: utf-8 -*-

# requirement: pip install pyperf

import importlib

from test.conf_test import conf, glob
from benchmarks.setup_db import init_db

module = glob()
dbdrv = importlib.import_module(module["module"])


def main():
    default_conf = conf()
    conn = dbdrv.connect(**default_conf)
    init_db(conn, dbdrv.paramstyle)
    conn.close()


if __name__ == "__main__":
    main()