Skip to content
Snippets Groups Projects
Commit 6df142b6 authored by Lukas Werner's avatar Lukas Werner
Browse files

Update benchmark.py

parent f0ee14fc
Branches
No related merge requests found
Pipeline #34851 passed with stages
in 1 minute and 41 seconds
......@@ -25,7 +25,7 @@ class MeasureMESAPD:
kernelbenchmark_exec = os.path.join(self.benchmarkFolder, 'MESA_PD_KernelBenchmark')
kernelbenchmark_config = os.path.join(self.benchmarkFolder, 'MESA_PD_Benchmark.cfg')
kernelbenchmark_cmd = 'mpirun --allow-run-as-root -np '+self.numCores+' --map-by core --bind-to core --report-bindings '+kernelbenchmark_exec+' '+kernelbenchmark_config
kernelbenchmark_cmd = 'mpirun --allow-run-as-root -np '+str(self.numCores)+' --map-by core --bind-to core --report-bindings '+kernelbenchmark_exec+' '+kernelbenchmark_config
print(kernelbenchmark_cmd)
start = time.time()
......@@ -63,7 +63,6 @@ class MeasureMESAPD:
{
'measurement': 'run_time',
'tags': {
'host': os.uname()[1],
'benchmark': 'MESA_PD_KernelBenchmark'
},
'fields': {
......@@ -79,7 +78,7 @@ class MeasureMESAPD:
granulargas_exec = os.path.join(self.benchmarkFolder, 'MESA_PD_GranularGas')
granulargas_config = os.path.join(self.benchmarkFolder, 'GranularGas.cfg')
granulargas_cmd = 'mpirun --allow-run-as-root -np '+self.numCores+' --map-by core --bind-to core '+granulargas_exec+' '+granulargas_config
granulargas_cmd = 'mpirun --allow-run-as-root -np '+str(self.numCores)+' --map-by core --bind-to core '+granulargas_exec+' '+granulargas_config
print(granulargas_cmd)
start = time.time()
......@@ -98,7 +97,6 @@ class MeasureMESAPD:
{
'measurement': 'run_time',
'tags': {
'host': os.uname()[1],
'benchmark': 'MESA_PD_GranularGas'
},
'fields': {
......@@ -126,10 +124,14 @@ def main():
print("Usage: " + sys.argv[0] + " num_cores build_folder")
exit(1)
numCores = sys.argv[1]
numCores = int(sys.argv[1])
buildFolder = sys.argv[2]
point_time = int(time.time())
host = os.uname()[1]
print("Using "+str(numCores)+" on "+host+" for benchmarking, timestamp: "+str(point_time)+".")
json_body = []
# perform measurements
......@@ -144,12 +146,13 @@ def main():
measurement['time'] = point_time
measurement['fields']['commit'] = commit.hexsha
measurement['fields']['num_cores'] = numCores
measurement['tags']['host'] = host
#print(json_body)
# upload to influx db
client = InfluxDBClient('i10grafana.informatik.uni-erlangen.de', 8086,
'benchmark', write_user_pw, 'benchmark')
client = InfluxDBClient('i10web.informatik.uni-erlangen.de', 8086,
'benchmarks', write_user_pw, 'benchmarks')
client.write_points(json_body, time_precision='s')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment