Skip to content

Commit

Permalink
Re-run the Benchmarking process for PyAF 5.0 #222. Corrected logging…
Browse files Browse the repository at this point in the history
… iin benchmarks.
  • Loading branch information
antoinecarme committed Mar 12, 2023
1 parent 3fbb494 commit 8f947c4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pyaf/Bench/GenericBenchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ def __init__(self, msg):
def set_pyaf_logger(log_filename):
import logging
import logging.config
pyaf_logger = logging.getLogger('pyaf.std')
pyaf_logger.setLevel(logging.DEBUG)
pyaf_logger.handlers = []
handler = logging.FileHandler(log_filename)
pyaf_logger.addHandler(handler)
logging.raiseExceptions = False
for tag in ['pyaf.std', 'pyaf.timing']:
pyaf_logger = logging.getLogger(tag)
pyaf_logger.setLevel(logging.DEBUG)
pyaf_logger.handlers = []
handler = logging.StreamHandler(sys.stdout) # logging.Handler(log_filename)
pyaf_logger.addHandler(handler)
pass

def set_process_name(name):
Expand All @@ -61,7 +63,7 @@ def run_bench_process(a):

sys.stdout = logfile
sys.stderr = logfile
# set_pyaf_logger(logfilename)
set_pyaf_logger(logfilename)
set_process_name(a.getName())
tester = cGeneric_OneSignal_Tester(a.mTSSpec , a.mBenchName);
a.mResult = tester;
Expand Down

0 comments on commit 8f947c4

Please sign in to comment.