INNER CODE UNIT · Python

__init__

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

    def __init__(self, db, args):
        self.db = db
        self.args = args

    def __call__(self):
        self.init_sql()

        rows = self.args.rows
        total_time = time.time()
        for i in range(int(self.args.times)):
            start_time = time.time()
            self.test(i)
            print ('{}: round: {} rows: {} to {} time: {}'.format(self.__class__.__name__,
                i, i*rows, (i+1)*rows, time.time()-start_time))

    def init_sql(self):
        pass

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…