INNER CODE UNIT · Python
__call__
bitpoke/mysql-operator · hack/development/stress_test.py:25
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
def test(self, epoch):
pass