runner_performance_cpu_time.py 505 B

123456789101112131415161718192021
  1. '''
  2. Created on 27-jul.-2014
  3. @author: Simon
  4. '''
  5. import Tkinter as tk
  6. import target_py.target_performance_threads as target
  7. import sys
  8. from sccd.runtime.statecharts_core import Event
  9. if __name__ == '__main__':
  10. def callback(ctrl, behind_schedule):
  11. if behind_schedule > 2000:
  12. print len(ctrl.object_manager.instances)
  13. ctrl.stop()
  14. sys.exit()
  15. controller = target.Controller(behind_schedule_callback=callback)
  16. controller.start()
  17. ui.window.mainloop()