Write number of cores to benchmarking file

pull/264/head
Dakota Benjamin 2016-02-29 09:47:54 -05:00
rodzic 8c9f312aff
commit 63917a0804
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -43,7 +43,7 @@ def benchmark(start, benchmarking_file, process):
# Write to benchmark file # Write to benchmark file
delta = (datetime.datetime.now() - start).total_seconds() delta = (datetime.datetime.now() - start).total_seconds()
with open(benchmarking_file, 'a') as b: with open(benchmarking_file, 'a') as b:
b.write('\n %s runtime: %s seconds' % (process, delta)) b.write('%s runtime: %s seconds\n' % (process, delta))
def run_and_return(cmdSrc, cmdDest=None): def run_and_return(cmdSrc, cmdDest=None):

Wyświetl plik

@ -5,6 +5,7 @@ from opendm import context
from opendm import types from opendm import types
from opendm import config from opendm import config
from opendm import io from opendm import io
from opendm import system
from dataset import ODMLoadDatasetCell from dataset import ODMLoadDatasetCell
from resize import ODMResizeCell from resize import ODMResizeCell
@ -76,6 +77,8 @@ class ODMApp(ecto.BlackBox):
if config.args.get('time') and io.file_exists(tree.benchmarking): if config.args.get('time') and io.file_exists(tree.benchmarking):
# Delete the previously made file # Delete the previously made file
os.remove(tree.benchmarking) os.remove(tree.benchmarking)
with open(tree.benchmarking, 'a') as b:
b.write('ODM Benchmarking file created %s\nNumber of Cores: %s\n\n' % (system.now(), context.num_cores))
def connections(self, _p): def connections(self, _p):
# define initial task # define initial task