OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
benchmarks.TPC_DS_10GB Class Reference
+ Inheritance diagram for benchmarks.TPC_DS_10GB:
+ Collaboration diagram for benchmarks.TPC_DS_10GB:

Public Member Functions

def checkForRequiredFiles
 
def setupAndChdirToWorkingDirectory
 
def run
 

Static Public Attributes

string SCALE = '10'
 
 external = True
 
string description = 'TPC-DS SCALE=%s SQL tests'
 
 name = __qualname__
 
string BASENAME = 'TPC-DS_Tools_v3.2.0'
 
string OUTPUT_DIR = '%s_%sGB'
 
string PG_TGZ = OUTPUT_DIR+'.tgz'
 
string DATADIR = 'storage'
 
int PORT_MAIN = 16274
 
int PORT_HTTP = 16278
 
int PORT_CALCITE = 16279
 
float SENTINEL_FAILED_TIME = 1234567.890
 

Detailed Description

TPC-DS SQL tests

Definition at line 125 of file benchmarks.py.

Member Function Documentation

def benchmarks.TPC_DS_10GB.checkForRequiredFiles (   self)

Definition at line 142 of file benchmarks.py.

References benchmarks.TPC_DS_10GB.PG_TGZ.

Referenced by benchmarks.TPC_DS_10GB.setupAndChdirToWorkingDirectory().

143  def checkForRequiredFiles(self):
144  assets_dir = os.environ.get('TPCDS_ASSETS_DIR')
145  assert assets_dir != None, 'Please set env variable TPCDS_ASSETS_DIR to directory with %s.' % (self.PG_TGZ)
146  file = self.PG_TGZ
147  assert os.path.exists('%s/.conbench' % os.environ.get('HOME')
148  ), 'A .conbench file is required to submit results to a conbench server.'
149  assert os.path.exists('%s/%s' % (assets_dir, file)), 'File %s not found in %s.' % (file, assets_dir)
150  return assets_dir

+ Here is the caller graph for this function:

def benchmarks.TPC_DS_10GB.run (   self,
  kwargs 
)

Definition at line 160 of file benchmarks.py.

References benchmarks.TPC_DS_10GB.DATADIR, benchmarks.StringDictionaryBenchmark.name, benchmarks.TPC_DS_10GB.name, heavyai.open(), benchmarks.TPC_DS_10GB.OUTPUT_DIR, benchmarks.TPC_DS_10GB.PORT_CALCITE, benchmarks.TPC_DS_10GB.PORT_HTTP, benchmarks.TPC_DS_10GB.PORT_MAIN, benchmarks.TPC_DS_10GB.SCALE, benchmarks.TPC_DS_10GB.SENTINEL_FAILED_TIME, benchmarks.TPC_DS_10GB.setupAndChdirToWorkingDirectory(), and benchmarks.testConnection().

161  def run(self, **kwargs):
162  commit = os.environ.get('GIT_COMMIT')
163  build_dir = os.path.realpath(os.path.join(os.getcwd(),'../../build-%s'%(commit)))
164  self.setupAndChdirToWorkingDirectory(build_dir + '/conbench')
165  # Start server on new port
166  bindir = build_dir + '/bin'
167  heavy_db_server = HeavyDbServer(bindir, self.DATADIR, self.PORT_MAIN, self.PORT_HTTP, self.PORT_CALCITE)
168  testConnection(bindir, self.PORT_MAIN)
169  # Run rake task
170  env = { 'HEAVYSQL': '%s/heavysql -p HyperInteractive --port %d'%(bindir,self.PORT_MAIN)
171  , 'SCALE': self.SCALE, 'SKIP_PG': '1', 'PATH': os.environ.get('PATH') }
172  subprocess.run('rake tpcds:compare', env=env, shell=True)
173  # report to conbench server
174  context = { 'benchmark_language': 'C++' }
175  info = { 'branch': os.environ.get('GIT_BRANCH') }
176  options = kwargs
177  # Read and process output json files
178  def query_num(filename):
179  md = re.search('/query(\d+).json$', filename)
180  return int(md.group(1)) if md else 0
181  for filename in sorted(glob.glob(self.OUTPUT_DIR+'/query*.json'), key=query_num):
182  with open(filename) as file:
183  benchmark = json.load(file)
184  tags = { 'benchmark_name': '%02d' % query_num(filename) }
185  data = [ benchmark['time_ms'] ] if benchmark['success'] else [ self.SENTINEL_FAILED_TIME ]
186  result = { 'data': data, 'unit': 'ms' }
187  info['message'] = benchmark['message'][:4096] # truncate large messages
188  yield self.conbench.record(
189  result, self.name, context=context, options=options, output=result, tags=tags, info=info
190  )
def testConnection
Definition: benchmarks.py:113
int open(const char *path, int flags, int mode)
Definition: heavyai_fs.cpp:66

+ Here is the call graph for this function:

def benchmarks.TPC_DS_10GB.setupAndChdirToWorkingDirectory (   self,
  workingdir 
)

Definition at line 151 of file benchmarks.py.

References benchmarks.TPC_DS_10GB.checkForRequiredFiles(), and benchmarks.TPC_DS_10GB.PG_TGZ.

Referenced by benchmarks.TPC_DS_10GB.run().

152  def setupAndChdirToWorkingDirectory(self, workingdir):
153  assets_dir = self.checkForRequiredFiles()
154  os.mkdir(workingdir, mode=0o775)
155  rakefile = os.path.realpath(os.path.join(os.getcwd(),'../rake/Rakefile'))
156  subprocess.run(['ln', '-s', rakefile, workingdir])
157  os.chdir(workingdir)
158  # Untar postgres results
159  subprocess.run(['tar', 'zxf', '%s/%s'%(assets_dir,self.PG_TGZ)])

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

string benchmarks.TPC_DS_10GB.BASENAME = 'TPC-DS_Tools_v3.2.0'
static

Definition at line 133 of file benchmarks.py.

string benchmarks.TPC_DS_10GB.DATADIR = 'storage'
static

Definition at line 136 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

string benchmarks.TPC_DS_10GB.description = 'TPC-DS SCALE=%s SQL tests'
static

Definition at line 130 of file benchmarks.py.

benchmarks.TPC_DS_10GB.external = True
static

Definition at line 129 of file benchmarks.py.

benchmarks.TPC_DS_10GB.name = __qualname__
static

Definition at line 131 of file benchmarks.py.

Referenced by TableFunctionsFactory_declbracket.Bracket.__repr__(), TableFunctionsFactory_declbracket.Bracket.__str__(), TableFunctionsFactory_declbracket.Bracket.apply_column(), TableFunctionsFactory_declbracket.Bracket.apply_namespace(), TableFunctionsFactory_declbracket.Bracket.format_sizer(), TableFunctionsFactory_declbracket.Bracket.normalize(), heavydb.extension_functions.ttypes.TUserDefinedFunction.read(), heavydb.extension_functions.ttypes.TUserDefinedTableFunction.read(), heavydb.thrift.ttypes.TDashboardGrantees.read(), heavydb.thrift.ttypes.TGeoFileLayerInfo.read(), heavydb.thrift.ttypes.TCustomExpression.read(), benchmarks.TPC_DS_10GB.run(), TableFunctionsFactory_declbracket.Bracket.tostring(), heavydb.extension_functions.ttypes.TUserDefinedFunction.write(), heavydb.extension_functions.ttypes.TUserDefinedTableFunction.write(), heavydb.thrift.ttypes.TDashboardGrantees.write(), heavydb.thrift.ttypes.TGeoFileLayerInfo.write(), and heavydb.thrift.ttypes.TCustomExpression.write().

string benchmarks.TPC_DS_10GB.OUTPUT_DIR = '%s_%sGB'
static

Definition at line 134 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

string benchmarks.TPC_DS_10GB.PG_TGZ = OUTPUT_DIR+'.tgz'
static

Definition at line 135 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.checkForRequiredFiles(), and benchmarks.TPC_DS_10GB.setupAndChdirToWorkingDirectory().

int benchmarks.TPC_DS_10GB.PORT_CALCITE = 16279
static

Definition at line 139 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

int benchmarks.TPC_DS_10GB.PORT_HTTP = 16278
static

Definition at line 138 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

int benchmarks.TPC_DS_10GB.PORT_MAIN = 16274
static

Definition at line 137 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

string benchmarks.TPC_DS_10GB.SCALE = '10'
static

Definition at line 128 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().

float benchmarks.TPC_DS_10GB.SENTINEL_FAILED_TIME = 1234567.890
static

Definition at line 140 of file benchmarks.py.

Referenced by benchmarks.TPC_DS_10GB.run().


The documentation for this class was generated from the following file: