oceanbase/unittest/sql/optimizer/storage_perf/benchmaster_storage.py
wangzelin.wzl 93a1074b0c patch 4.0
2022-10-24 17:57:12 +08:00

26 lines
533 B
Python

#!/bin/env python
__author__ = 'dongyun.zdy'
import subprocess as sp
import os
import sys
from random import randint
import re
def run_cmd(cmd):
print cmd
res = ''
p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sp.STDOUT)
while True:
line = p.stdout.readline()
res += line
if line:
print line.strip()
sys.stdout.flush()
else:
break
p.wait()
return res
run_cmd('./benchmaster_storage_scan.py')
run_cmd('./benchmaster_storage_get.py')