def _add_state_machine_to_manager_model(): from rafcon.gui.singleton import state_machine_manager if profiling: profiler.start("add_state_machine") state_machine_manager.add_state_machine(state_machine) testing_utils.wait_for_gui() if profiling: profiler.stop("add_state_machine")
finally: destroy_gui(caplog) if __name__ == '__main__': # global_profiling = True global_profiling = False if global_profiling: profiler.start("global") # test_gui(10) # around 1 second # test_gui(10, execute=True) # around 1.5 seconds test_gui(10, profile_add_state=not global_profiling) # around 10 seconds # TODO: executing states to fast without sleep or too less sleep leads to a recursion error # test_gui(100, execute=True, sleep=False) # smallest state machine leading to recursion error # test_gui(50, execute=True, sleep=False) # leads to recursion error # test_gui(100, execute=True, sleep=False) # leads to recursion error # test_gui(80, execute=True, sleep=True) # around 23.5 seconds # test_gui(100, execute=True, sleep=True) # leads to recursion error with a sleep of 0.2 seconds per state # test_gui(200) # around 48 seconds # test_gui(10, 10, True) # around 5.8 seconds # test_gui(20, 10, True) # around 24.5 seconds # test_gui(30, 10, True) # around 57.5 seconds # test_gui(10, 20, True) # around 19.6 seconds # test_gui(10, 30, True) # around 40.6 seconds if global_profiling: profiler.stop("global")