Created
December 15, 2019 08:11
-
-
Save gregrahn/4109aede025da1ab97d1ce107325c84f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sys | |
import os | |
cmd = "./dsqgen -QUIET Y -DIALECT netezza -SCALE 100000 -TEMPLATE crash.tpl -DIRECTORY ../query_templates" | |
template1 = ''' | |
define C= ulist(random(1, {}, uniform),5); | |
select | |
[C.1], | |
[C.2], | |
[C.3], | |
[C.4], | |
[C.5] | |
; | |
''' | |
template2 = ''' | |
define C= random(1, {}, uniform); | |
select [C] ; | |
''' | |
for i in range(100000000,4800000000,100000000): | |
s = template1.format(i) | |
f= open("../query_templates/crash.tpl","w") | |
f.write(s) | |
f.close() | |
start = time.time() | |
os.system(cmd) | |
print("{}\t{}".format(i, time.time() - start)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment