Skip to content

Commit 9f91370

Browse files
authored
V0.6.3 Unified benchmarking / evaluation components, refined loading and indexing components (#156)
* Masterscript: Towards unifying collections of loading and benchmarking components * Masterscript: Unification of run_benchmarker_pod() * Evaluator: First sketch of implementation * Evaluator: Exit code * Masterscript: Currently, only benchmarking component fetches loading metrics * Evaluator: First sketch of implementation * Evaluator: Debugging * Masterscript: Unification of run_benchmarker_pod() * Masterscript: Unification of run_benchmarker_pod() - copy split connection files * Masterscript: Test benchbase result * Masterscript: get_workflow_list() to test results for completeness * Masterscript: Dump output of loading metrics pod * Masterscript: Reconstruct workflow need benchmarking df * Masterscript: Compare reconstructed workflow with benchmarker lists * Evaluator: HammerDB test result for formal correctness * Masterscript: use_distributed_datasource, default False * Masterscript: Loading metrics dumps debug infos * Masterscript: Monitoring set to 5s scraping interval * Masterscript: Monitoring set to 15s scraping interval * Masterscript: Monitoring scraping interval as parameter of experiment and configuration * HammerDB: Download results * Masterscript: More job labels to identify connection and time * Masterscript: More job labels to identify connection and time * Masterscript: Monitor stream first tests * Masterscript: Monitor stream for all benchmarking components * Masterscript: Monitoring transformed * Masterscript: Monitoring loading uses connection's specific config * Masterscript: Monitoring stream uses connection's specific config, show errors * Masterscript: Monitoring changes connection.config, overwrite it with correct data again * Masterscript: Remove old methods and set path more consistently * Masterscript: Upload connection.config * Masterscript: Docs * Masterscript: Loading time from time spans of pods * Masterscript: Loading time from time spans of pods - more debug output * Masterscript: Loading time from time spans of pods if exists, total time span otherwise * Masterscript: Also add timeGenerator as info * Masterscript: Remove old evaluation methods * Masterscript: Indexing reuses schema script methods * Masterscript: time_ingested at sut and pvc * Masterscript: No indexing per default * Masterscript: Also store time markers per pod and container of jobs (loading and benchmarking) * Masterscript: Use message queue for benchmarker * Masterscript: Also store time markers per pod and container of jobs (loading and benchmarking) * Masterscript: Also store time markers per pod and container of jobs (loading and benchmarking) in connection.config * Masterscript: Sketch storing index time, dbmsbenchmarker uses benchmarking_parameters * DBMSBenchmarker: Time synch 4 min in future * Masterscript: Copy configs to result folder before starting benchmarker component's job * Masterscript: Only delete job pods when job is completed * Masterscript: patch loading * Masterscript: store timeIngesting * Require: patch loading * Masterscript: patch loading * Masterscript: store timeIndex * Masterscript: set_pod_counter() to 0 before loading starts * Masterscript: read timeLoading after indexing (again) * Masterscript: store timeSchema * Masterscript: store all script_times * Masterscript: store all script_times as float * Masterscript: Log scripting times for debugging * Masterscript: Verify loading times * Masterscript: set_additional_labels() * Masterscript: set_additional_labels() SF for TPC-H
1 parent bbb3e01 commit 9f91370

File tree

6 files changed

+1818
-1083
lines changed

6 files changed

+1818
-1083
lines changed

bexhoma/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""
22
The clustermanager module
33
"""
4-
__all__ = ["clusters", "experiments", "configurations"]
4+
__all__ = ["evaluators", "clusters", "experiments", "configurations"]

bexhoma/clusters.py

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(self, clusterconfig='cluster.config', experiments_configfolder='exp
8989
configfile=f.read()
9090
self.config = eval(configfile)
9191
self.experiments_configfolder = experiments_configfolder
92-
self.resultfolder = self.config['benchmarker']['resultfolder']
92+
self.resultfolder = self.config['benchmarker']['resultfolder'].replace("\\", "/").replace("C:", "")
9393
self.queryfile = queryfile
9494
self.clusterconfig = clusterconfig
9595
self.timeLoading = 0
@@ -1001,6 +1001,48 @@ def get_jobs(self, app='', component='', experiment='', configuration='', client
10011001
# try again, if not failed due to "not found"
10021002
if not e.status == 404:
10031003
return self.get_jobs(app=app, component=component, experiment=experiment, configuration=configuration, client=client)
1004+
def get_jobs_labels(self, app='', component='', experiment='', configuration='', client=''):
1005+
"""
1006+
Return all jobs matching a set of labels (component/ experiment/ configuration)
1007+
1008+
:param app: app the job belongs to
1009+
:param component: Component, for example sut or monitoring
1010+
:param experiment: Unique identifier of the experiment
1011+
:param configuration: Name of the dbms configuration
1012+
:param client: DEPRECATED?
1013+
"""
1014+
#print("getJobs")
1015+
label = ''
1016+
if len(app)==0:
1017+
app = self.appname
1018+
label += 'app='+app
1019+
if len(component)>0:
1020+
label += ',component='+component
1021+
if len(experiment)>0:
1022+
label += ',experiment='+experiment
1023+
if len(configuration)>0:
1024+
label += ',configuration='+configuration
1025+
if len(client)>0:
1026+
label += ',client='+client
1027+
self.logger.debug('get_jobs_labels '+label)
1028+
job_labels = {}
1029+
try:
1030+
api_response = self.v1batches.list_namespaced_job(self.namespace, label_selector=label)#'app='+appname)
1031+
#pprint(api_response)
1032+
if len(api_response.items) > 0:
1033+
for item in api_response.items:
1034+
job_labels[item.metadata.name] = item.metadata.labels
1035+
return job_labels
1036+
else:
1037+
return []
1038+
except ApiException as e:
1039+
print("Exception when calling BatchV1Api->list_namespaced_job: %s\n" % e)
1040+
print("Create new access token")
1041+
self.cluster_access()
1042+
self.wait(2)
1043+
# try again, if not failed due to "not found"
1044+
if not e.status == 404:
1045+
return self.get_jobs_labels(app=app, component=component, experiment=experiment, configuration=configuration, client=client)
10041046
def get_job_status(self, jobname='', app='', component='', experiment='', configuration='', client=''):
10051047
"""
10061048
Return status of a jobs given by name or matching a set of labels (component/ experiment/ configuration)
@@ -1415,6 +1457,21 @@ def add_to_messagequeue(self, queue, data):
14151457
self.logger.debug("I am using messagequeue {}".format(pod_messagequeue))
14161458
redisCommand = 'redis-cli rpush {redisQueue} {data} '.format(redisQueue=queue, data=data)
14171459
self.execute_command_in_pod(command=redisCommand, pod=pod_messagequeue)
1460+
def set_pod_counter(self, queue, value=0):
1461+
"""
1462+
Add data to (Redis) message queue.
1463+
1464+
:param queue: Name of the queue
1465+
:param data: Data to be added to queue
1466+
"""
1467+
pods_messagequeue = self.get_pods(component='messagequeue')
1468+
if len(pods_messagequeue) > 0:
1469+
pod_messagequeue = pods_messagequeue[0]
1470+
else:
1471+
pod_messagequeue = 'bexhoma-messagequeue-5ff94984ff-mv9zn'
1472+
self.logger.debug("I am using messagequeue {}".format(pod_messagequeue))
1473+
redisCommand = 'redis-cli set {redisQueue} {value} '.format(redisQueue=queue, value=value)
1474+
self.execute_command_in_pod(command=redisCommand, pod=pod_messagequeue)
14181475

14191476

14201477

0 commit comments

Comments
 (0)