#-------------------------------------------------------------------------- print("-" * 79) print("\nTotal of %i benchmak loops run in %.2f sec %s CPU cycles." % (loops, total_duration, locale_format_number(total_cycles))) print("\tavg.: %s CPU cycles/sec" % locale_format_number(total_cycles / total_duration)) if __name__ == '__main__': from MC6809.utils.logging_utils import setup_logging setup_logging( log, # level=1 # hardcore debug ;) # level=10 # DEBUG # level=20 # INFO # level=30 # WARNING # level=40 # ERROR level=50 # CRITICAL/FATAL ) # will be done in CLI: locale.setlocale(locale.LC_ALL, '') # For Formating cycles/sec number run_benchmark(loops=1 # loops=2 # loops=10 ) print(" --- END --- ")
""" from __future__ import absolute_import, division, print_function import unittest if __name__ == '__main__': from MC6809.utils.logging_utils import setup_logging setup_logging( # level=1 # hardcore debug ;) # level=10 # DEBUG # level=20 # INFO # level=30 # WARNING # level=40 # ERROR # level=50 # CRITICAL/FATAL level=99 ) loader = unittest.TestLoader() tests = loader.discover('.') # test_runner = TextTestRunner2( test_runner = unittest.TextTestRunner( # verbosity=1, verbosity=2, failfast=True, )