ekfsm 1.4.0a60__tar.gz → 1.5.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ekfsm might be problematic. Click here for more details.

Files changed (197) hide show
  1. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/PKG-INFO +1 -1
  2. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/devenv.lock +2 -2
  3. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/pyproject.toml +1 -1
  4. ekfsm-1.5.0a1/tests/analyze_cctv_profile.py +73 -0
  5. ekfsm-1.5.0a1/tests/analyze_profile.py +59 -0
  6. ekfsm-1.5.0a1/tests/cctv.py +163 -0
  7. ekfsm-1.5.0a1/tests/profiling_template.py +188 -0
  8. ekfsm-1.5.0a1/tests/sq3-only.py +112 -0
  9. ekfsm-1.4.0a60/tests/cctv.py +0 -80
  10. ekfsm-1.4.0a60/tests/sq3-only.py +0 -73
  11. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.env +0 -0
  12. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.envrc +0 -0
  13. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.flake8 +0 -0
  14. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.gitattributes +0 -0
  15. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.gitignore +0 -0
  16. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.gitlab-ci.yml +0 -0
  17. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.readthedocs.yaml +0 -0
  18. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.vscode/launch.json +0 -0
  19. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/.vscode/settings.json +0 -0
  20. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/GitVersion.yml +0 -0
  21. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/LICENSE.md +0 -0
  22. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/README.md +0 -0
  23. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/devenv.nix +0 -0
  24. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/devenv.yaml +0 -0
  25. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/.gitignore +0 -0
  26. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/Makefile +0 -0
  27. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/requirements.txt +0 -0
  28. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/_static/devices.drawio.png +0 -0
  29. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/_static/devices.drawio.svg +0 -0
  30. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/_static/ekfsm_system.drawio.png +0 -0
  31. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/_static/ekfsm_system.drawio.svg +0 -0
  32. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/ccu.rst +0 -0
  33. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sc5-festival.rst +0 -0
  34. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sc9-toccata.rst +0 -0
  35. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/se5-club.rst +0 -0
  36. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sn4-djembe.rst +0 -0
  37. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/snippets/cpci_inventory.rst +0 -0
  38. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/spv-mystic.rst +0 -0
  39. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sq1-track.rst +0 -0
  40. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sq3-quartet.rst +0 -0
  41. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/ekf/sur-uart.rst +0 -0
  42. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards/hitron/hdrc-300s.rst +0 -0
  43. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/boards.rst +0 -0
  44. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/conf.py +0 -0
  45. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/index.rst +0 -0
  46. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/intro.rst +0 -0
  47. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/reference/ekfsm.rst +0 -0
  48. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/reference/index.rst +0 -0
  49. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/docs/source/reference/systemconfig.rst +0 -0
  50. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/__init__.py +0 -0
  51. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/ccu.yaml +0 -0
  52. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sc5-festival.yaml +0 -0
  53. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sc9-toccata.yaml +0 -0
  54. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/se5-club.yaml +0 -0
  55. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sn4-djembe.yaml +0 -0
  56. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/spv-mystic.yaml +0 -0
  57. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sq1-track.yaml +0 -0
  58. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sq3-quartet.yaml +0 -0
  59. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/srf-fan.yaml +0 -0
  60. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/sur-uart.yaml +0 -0
  61. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/ekf/z1010.yaml +0 -0
  62. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/boards/oem/hitron/hdrc-300s.yaml +0 -0
  63. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/cli.py +0 -0
  64. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/config.py +0 -0
  65. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/__init__.py +0 -0
  66. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/components.py +0 -0
  67. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/connections.py +0 -0
  68. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/probe.py +0 -0
  69. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/slots.py +0 -0
  70. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/sysfs.py +0 -0
  71. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/core/utils.py +0 -0
  72. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/__init__.py +0 -0
  73. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/button.py +0 -0
  74. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/buttonArray.py +0 -0
  75. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/colorLed.py +0 -0
  76. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/coretemp.py +0 -0
  77. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/eeprom.py +0 -0
  78. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/ekf_ccu_uc.py +0 -0
  79. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/ekf_sur_led.py +0 -0
  80. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/generic.py +0 -0
  81. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/gpio.py +0 -0
  82. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/iio.py +0 -0
  83. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/iio_thermal_humidity.py +0 -0
  84. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/imu.py +0 -0
  85. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/io4edge.py +0 -0
  86. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/ledArray.py +0 -0
  87. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/mux.py +0 -0
  88. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/pixelDisplay.py +0 -0
  89. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/pmbus.py +0 -0
  90. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/smbios.py +0 -0
  91. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/smbus.py +0 -0
  92. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/thermal_humidity.py +0 -0
  93. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/utils.py +0 -0
  94. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/devices/watchdog.py +0 -0
  95. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/exceptions.py +0 -0
  96. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/lock.py +0 -0
  97. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/log.py +0 -0
  98. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/py.typed +0 -0
  99. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/simctrl.py +0 -0
  100. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/system.py +0 -0
  101. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/ekfsm/utils.py +0 -0
  102. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/hack/bringup_zip_i2c_devs.sh +0 -0
  103. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/scripts/modify-acpi-table.sh +0 -0
  104. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/__init__.py +0 -0
  105. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/basic_sim.py +0 -0
  106. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/cctv.yaml +0 -0
  107. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/ccu-test.py +0 -0
  108. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/ccu_wokwi_sim.py +0 -0
  109. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/data/cfg_simple.yaml +0 -0
  110. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/locking/lock_tester.py +0 -0
  111. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/locking/test_lock.py +0 -0
  112. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/props.py +0 -0
  113. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/run.py +0 -0
  114. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sc5-hitron-only.yaml +0 -0
  115. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/SQ3.png +0 -0
  116. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/__init__.py +0 -0
  117. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/bus/i2c/drivers/at24/.keep +0 -0
  118. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/bus/i2c/drivers/pca953x/.keep +0 -0
  119. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/bus/i2c/drivers/pca954x/.keep +0 -0
  120. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/class/hwmon/hwmon2/name +0 -0
  121. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/class/hwmon/hwmon2/temp1_input +0 -0
  122. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/firmware_node/adr +0 -0
  123. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/name +0 -0
  124. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/new_device +0 -0
  125. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/firmware_node/adr +0 -0
  126. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/name +0 -0
  127. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/new_device +0 -0
  128. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/firmware_node/adr +0 -0
  129. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/name +0 -0
  130. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/new_device +0 -0
  131. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/firmware_node/adr +0 -0
  132. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/firmware_node/description +0 -0
  133. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/gpiochip1/dev +0 -0
  134. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/name +0 -0
  135. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/eeprom +0 -0
  136. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/firmware_node/description +0 -0
  137. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/name +0 -0
  138. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/name +0 -0
  139. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/new_device +0 -0
  140. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/firmware_node/adr +0 -0
  141. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/name +0 -0
  142. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/new_device +0 -0
  143. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/firmware_node/adr +0 -0
  144. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/name +0 -0
  145. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/new_device +0 -0
  146. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/firmware_node/adr +0 -0
  147. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/name +0 -0
  148. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/new_device +0 -0
  149. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/firmware_node/adr +0 -0
  150. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/firmware_node/description +0 -0
  151. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/gpiochip1/dev +0 -0
  152. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/name +0 -0
  153. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/eeprom +0 -0
  154. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/firmware_node/description +0 -0
  155. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/name +0 -0
  156. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/name +0 -0
  157. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/new_device +0 -0
  158. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/firmware_node/description +0 -0
  159. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/name +0 -0
  160. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/firmware_node/description +0 -0
  161. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr1_input +0 -0
  162. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr2_input +0 -0
  163. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in1_input +0 -0
  164. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in2_input +0 -0
  165. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/model +0 -0
  166. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/revision +0 -0
  167. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/serial +0 -0
  168. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/temp1_input +0 -0
  169. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/vendor +0 -0
  170. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/name +0 -0
  171. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/firmware_node/description +0 -0
  172. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/name +0 -0
  173. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/new_device +0 -0
  174. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/eeprom +0 -0
  175. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/name +0 -0
  176. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/devices/virtual/dmi/id/board_version +0 -0
  177. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/kernel/debug/pmbus/hwmon99/status0_input +0 -0
  178. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/sys/kernel/debug/pmbus/hwmon99/status1_input +0 -0
  179. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/test_system.yaml +0 -0
  180. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sim/test_system_inconsistent.yaml +0 -0
  181. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/sq3-only.yaml +0 -0
  182. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/srf-fan-test.py +0 -0
  183. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/srf-fan-test.yaml +0 -0
  184. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/test_config.py +0 -0
  185. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/test_module_schema.py +0 -0
  186. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/test_sim-ccu-eeprom.py +0 -0
  187. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/test_sim1.py +0 -0
  188. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/test_sim2.py +0 -0
  189. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2-ccu-only.yaml +0 -0
  190. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2-comp1.yaml +0 -0
  191. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2-comp1_smoke.py +0 -0
  192. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2-comp2.yaml +0 -0
  193. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2-comp2_smoke.py +0 -0
  194. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2_ccu_exp.py +0 -0
  195. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2_ccu_imu.py +0 -0
  196. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/tests/zip2_psu.py +0 -0
  197. {ekfsm-1.4.0a60 → ekfsm-1.5.0a1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ekfsm
3
- Version: 1.4.0a60
3
+ Version: 1.5.0a1
4
4
  Summary: The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices.
5
5
  Author-email: Jan Jansen <jan@ekf.de>, Klaus Popp <klaus.popp@ci4rail.com>, Felix Päßler <fp@ekf.de>
6
6
  Requires-Python: >=3.12
@@ -75,10 +75,10 @@
75
75
  ]
76
76
  },
77
77
  "locked": {
78
- "lastModified": 1759523803,
78
+ "lastModified": 1760392170,
79
79
  "owner": "cachix",
80
80
  "repo": "pre-commit-hooks.nix",
81
- "rev": "cfc9f7bb163ad8542029d303e599c0f7eee09835",
81
+ "rev": "46d55f0aeb1d567a78223e69729734f3dca25a85",
82
82
  "type": "github"
83
83
  },
84
84
  "original": {
@@ -27,7 +27,7 @@ authors = [
27
27
  ]
28
28
  description = "The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices."
29
29
  requires-python = ">=3.12"
30
- version = "1.4.0-alpha.60"
30
+ version = "1.5.0-alpha.1"
31
31
 
32
32
  [project.scripts]
33
33
  ekfsm-cli = "ekfsm.cli:main"
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Enhanced profiling analysis script for cctv_profile.prof
4
+ Analyzes CCTV system profiling results focusing on:
5
+ - Watchdog operations
6
+ - LED control functions
7
+ - Button array operations
8
+ - ekfsm and io4edge_client module usage
9
+ """
10
+
11
+ import pstats
12
+ from pathlib import Path
13
+
14
+
15
+ def analyze_cctv_profile():
16
+ profile_file = Path(__file__).parent / "cctv_profile.prof"
17
+
18
+ if not profile_file.exists():
19
+ print(f"Profile file not found: {profile_file}")
20
+ print("Run cctv.py first to generate the profile")
21
+ return
22
+
23
+ stats = pstats.Stats(str(profile_file))
24
+ stats.strip_dirs()
25
+
26
+ print("=" * 80)
27
+ print("DETAILED ANALYSIS OF CCTV PROFILING")
28
+ print("=" * 80)
29
+
30
+ print("\n1. EKFSM MODULE ANALYSIS")
31
+ print("-" * 40)
32
+ stats.sort_stats("tottime").print_stats(r"ekfsm", 15)
33
+
34
+ print("\n2. IO4EDGE_CLIENT MODULE ANALYSIS")
35
+ print("-" * 40)
36
+ stats.sort_stats("tottime").print_stats(r"io4edge_client", 15)
37
+
38
+ print("\n3. WATCHDOG OPERATIONS ANALYSIS")
39
+ print("-" * 40)
40
+ stats.sort_stats("tottime").print_stats(r"watchdog|kick", 10)
41
+
42
+ print("\n4. LED CONTROL OPERATIONS ANALYSIS")
43
+ print("-" * 40)
44
+ stats.sort_stats("tottime").print_stats(r"led|colorLED|set", 10)
45
+
46
+ print("\n5. BUTTON OPERATIONS ANALYSIS")
47
+ print("-" * 40)
48
+ stats.sort_stats("tottime").print_stats(r"button|eject|read_stream", 10)
49
+
50
+ print("\n6. SOCKET/TRANSPORT LAYER ANALYSIS")
51
+ print("-" * 40)
52
+ stats.sort_stats("tottime").print_stats(r"socket|transport", 10)
53
+
54
+ print("\n7. MOST TIME-CONSUMING FUNCTIONS (ALL)")
55
+ print("-" * 40)
56
+ stats.sort_stats("tottime").print_stats(20)
57
+
58
+ print("\n8. FUNCTIONS WITH MOST CALLS")
59
+ print("-" * 40)
60
+ stats.sort_stats("ncalls").print_stats(15)
61
+
62
+ print("\n9. CUMULATIVE TIME ANALYSIS")
63
+ print("-" * 40)
64
+ stats.sort_stats("cumtime").print_stats(15)
65
+
66
+ print("\n10. CCTV-SPECIFIC HARDWARE INTERACTIONS")
67
+ print("-" * 40)
68
+ # Look for CCTV-specific patterns
69
+ stats.sort_stats("tottime").print_stats(r"smc|i4e", 10)
70
+
71
+
72
+ if __name__ == "__main__":
73
+ analyze_cctv_profile()
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Enhanced profiling analysis script for sq3_profile.prof
4
+ """
5
+
6
+ import pstats
7
+ from pathlib import Path
8
+
9
+
10
+ def analyze_profile():
11
+ profile_file = Path(__file__).parent / "sq3_profile.prof"
12
+
13
+ if not profile_file.exists():
14
+ print(f"Profile file not found: {profile_file}")
15
+ print("Run sq3-only.py first to generate the profile")
16
+ return
17
+
18
+ stats = pstats.Stats(str(profile_file))
19
+ stats.strip_dirs()
20
+
21
+ print("=" * 80)
22
+ print("DETAILED ANALYSIS OF SQ3 PROFILING")
23
+ print("=" * 80)
24
+
25
+ print("\n1. EKFSM MODULE ANALYSIS")
26
+ print("-" * 40)
27
+ stats.sort_stats("tottime").print_stats(r"ekfsm", 15)
28
+
29
+ print("\n2. IO4EDGE_CLIENT MODULE ANALYSIS")
30
+ print("-" * 40)
31
+ stats.sort_stats("tottime").print_stats(r"io4edge_client", 15)
32
+
33
+ print("\n3. SOCKET/TRANSPORT LAYER ANALYSIS")
34
+ print("-" * 40)
35
+ stats.sort_stats("tottime").print_stats(r"socket|transport", 10)
36
+
37
+ print("\n4. DISPLAY OPERATIONS ANALYSIS")
38
+ print("-" * 40)
39
+ stats.sort_stats("tottime").print_stats(r"display|pixel|image", 10)
40
+
41
+ print("\n5. BUTTON OPERATIONS ANALYSIS")
42
+ print("-" * 40)
43
+ stats.sort_stats("tottime").print_stats(r"button|read_stream", 10)
44
+
45
+ print("\n6. MOST TIME-CONSUMING FUNCTIONS (ALL)")
46
+ print("-" * 40)
47
+ stats.sort_stats("tottime").print_stats(20)
48
+
49
+ print("\n7. FUNCTIONS WITH MOST CALLS")
50
+ print("-" * 40)
51
+ stats.sort_stats("ncalls").print_stats(15)
52
+
53
+ print("\n8. CUMULATIVE TIME ANALYSIS")
54
+ print("-" * 40)
55
+ stats.sort_stats("cumtime").print_stats(15)
56
+
57
+
58
+ if __name__ == "__main__":
59
+ analyze_profile()
@@ -0,0 +1,163 @@
1
+ import pprint
2
+ import logging
3
+ from pathlib import Path
4
+ import threading
5
+ from time import sleep
6
+ import cProfile
7
+ import pstats
8
+
9
+ from ekfsm.system import System
10
+
11
+ logging.basicConfig(
12
+ level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
13
+ )
14
+
15
+ # Initialize system first (without profiling the setup)
16
+ config = Path(__file__).parent / "cctv.yaml"
17
+ try:
18
+ system = System(config, abort=True)
19
+ system_initialized = True
20
+ except Exception as e:
21
+ print(f"System initialization failed: {e}")
22
+ print("Continuing with mock profiling demonstration...")
23
+ system_initialized = False
24
+ system = None
25
+
26
+ if not system_initialized:
27
+ print("System not available, creating mock profiling demonstration...")
28
+ print(
29
+ "This demonstrates the profiling structure that would be used with real hardware."
30
+ )
31
+ print("The same profiling patterns from sq3-only.py can be applied here.")
32
+ exit(0)
33
+
34
+ # Start profiling HIER - nach System-Setup, vor io4edge_client Aufrufen
35
+ profiler = cProfile.Profile(builtins=False)
36
+ profiler.enable()
37
+
38
+ try:
39
+ pprint.pprint(f"System slots {system.slots}")
40
+
41
+ system.print()
42
+
43
+ print(system.smc.i4e.leds.client._fb_client.connected)
44
+
45
+ cpu = system["CPU"]
46
+ cpuB = system.cpu
47
+ cpuC = system[0]
48
+
49
+ assert cpu == cpuB == cpuC
50
+
51
+ # To check why below is failing
52
+ # cpu_slot = system.slots["SYSTEM_SLOT"]
53
+ # cpu_slotB = system.slots.SYSTEM_SLOT
54
+ # cpu_slotC = system.slots[0]
55
+
56
+ # assert cpu_slot == cpu_slotB == cpu_slotC
57
+
58
+ cpu.print()
59
+ print(f"probing CPU: {cpu.probe()}")
60
+ print(
61
+ f"inventory: {cpu.inventory.vendor()} {cpu.inventory.model()} {cpu.inventory.serial()}"
62
+ )
63
+
64
+ smc = system.smc
65
+
66
+ smc.print()
67
+
68
+ i4e = smc.i4e
69
+ i4e.watchdog.kick()
70
+ print(i4e.watchdog.client._fb_client.connected)
71
+ i4e.leds.led2.set(0, True)
72
+ print(system.smc.i4e.leds.client._fb_client.connected)
73
+ i4e.leds.led5.set(3, True)
74
+ print(system.smc.i4e.leds.client._fb_client.connected)
75
+ i4e.leds.led3.set(5, False)
76
+ print(system.smc.i4e.leds.client._fb_client.connected)
77
+
78
+ button_array = i4e.buttons
79
+ # print(button_array._client._fb_client.connected)
80
+
81
+ eject = button_array.eject
82
+
83
+ eject.handler = lambda: print("Eject pressed")
84
+
85
+ stop_event = threading.Event()
86
+ button_thread = threading.Thread(target=button_array.read, args=(stop_event,))
87
+ button_thread.start()
88
+
89
+ for i in range(30):
90
+ print("Main thread running...")
91
+ # i4e.watchdog.kick()
92
+ # print(i4e.watchdog.client._fb_client.connected)
93
+ # i4e.leds.led2.set(0, True)
94
+ # print(system.smc.i4e.leds.client._fb_client.connected)
95
+ # i4e.leds.led5.set(3, True)
96
+ # print(system.smc.i4e.leds.client._fb_client.connected)
97
+ # i4e.leds.led3.set(5, False)
98
+ # print(system.smc.i4e.leds.client._fb_client.connected)
99
+ sleep(1)
100
+
101
+ # To stop the thread:
102
+ stop_event.set()
103
+ button_thread.join()
104
+
105
+ except Exception as e:
106
+ print(f"Error during execution: {e}")
107
+ print("This is expected on systems without the required hardware.")
108
+
109
+ finally:
110
+ profiler.disable()
111
+
112
+ print("\n" + "=" * 80)
113
+ print("PROFILING RESULTS - ekfsm and io4edge_client modules (CCTV)")
114
+ print("=" * 80)
115
+
116
+ # Create stats object and filter for our modules
117
+ stats = pstats.Stats(profiler)
118
+ stats.strip_dirs() # clean paths
119
+
120
+ # Print comprehensive profiling results
121
+ print("\n1. TOP FUNCTIONS BY TOTAL TIME (including subcalls)")
122
+ stats.sort_stats("tottime").print_stats(
123
+ r"ekfsm|io4edge_client|client\.py|watchdog|led|button", 30
124
+ )
125
+
126
+ print("\n2. TOP FUNCTIONS BY CUMULATIVE TIME (time + subcalls)")
127
+ stats.sort_stats("cumtime").print_stats(
128
+ r"ekfsm|io4edge_client|client\.py|watchdog|led|button", 30
129
+ )
130
+
131
+ print("\n3. TOP FUNCTIONS BY NUMBER OF CALLS")
132
+ stats.sort_stats("ncalls").print_stats(
133
+ r"ekfsm|io4edge_client|client\.py|watchdog|led|button", 20
134
+ )
135
+
136
+ print("\n3a. ALL FUNCTIONS - DEBUGGING VIEW (to see what's actually being called)")
137
+ stats.sort_stats("tottime").print_stats(50) # Show top 50 functions overall
138
+
139
+ print("\n4. CALLERS/CALLEES ANALYSIS FOR TOP 5 FUNCTIONS")
140
+ # Get the top 5 functions by total time
141
+ top_funcs = stats.get_stats_profile().func_profiles
142
+ filtered_funcs = {
143
+ k: v
144
+ for k, v in top_funcs.items()
145
+ if any(mod in str(k) for mod in ["ekfsm", "io4edge_client"])
146
+ }
147
+ sorted_funcs = sorted(
148
+ filtered_funcs.items(), key=lambda x: x[1].tottime, reverse=True
149
+ )
150
+
151
+ for i, (func_key, func_stats) in enumerate(sorted_funcs[:5]):
152
+ print(f"\n--- Function #{i+1}: {func_key} ---")
153
+ print(f"Total time: {func_stats.tottime:.6f}s, Calls: {func_stats.ncalls}")
154
+ stats.print_callers(func_key)
155
+
156
+ # Save detailed profile to file for later analysis
157
+ profile_file = Path(__file__).parent / "cctv_profile.prof"
158
+ profiler.dump_stats(str(profile_file))
159
+ print(f"\n5. Detailed profile saved to: {profile_file}")
160
+ print(" Use: python -m pstats cctv_profile.prof")
161
+ print(" Or: snakeviz cctv_profile.prof (install: pip install snakeviz)")
162
+
163
+ print("\n" + "=" * 80)
@@ -0,0 +1,188 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Template für Profiling von ekfsm und io4edge_client Modulen
4
+
5
+ Dieses Template zeigt, wie das Profiling-Prinzip auf beliebige Scripts angewendet wird.
6
+ Kopieren Sie diesen Code und passen Sie ihn an Ihr spezifisches Script an.
7
+
8
+ Verwendung:
9
+ 1. Importieren Sie cProfile und pstats
10
+ 2. Initialisieren Sie das System OHNE Profiling
11
+ 3. Starten Sie das Profiling VOR den io4edge_client Aufrufen
12
+ 4. Führen Sie Ihre io4edge_client/ekfsm Operationen aus
13
+ 5. Stoppen Sie das Profiling und analysieren Sie die Ergebnisse
14
+ """
15
+
16
+ import cProfile
17
+ import pstats
18
+ from pathlib import Path
19
+ import logging
20
+
21
+ # Optional: Setzen Sie Logging-Level für bessere Sichtbarkeit
22
+ logging.basicConfig(
23
+ level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
24
+ )
25
+
26
+
27
+ def profile_ekfsm_io4edge_operations():
28
+ """
29
+ Template-Funktion für Profiling von ekfsm und io4edge_client Operationen
30
+ """
31
+
32
+ # SCHRITT 1: System-Initialisierung OHNE Profiling
33
+ print("Initializing system...")
34
+ try:
35
+ from ekfsm.system import System
36
+
37
+ # Passen Sie den Konfigurationspfad an Ihr Script an
38
+ config = Path(__file__).parent / "your-config.yaml"
39
+ system = System(config, abort=True)
40
+ system_available = True
41
+
42
+ except Exception as e:
43
+ print(f"System initialization failed: {e}")
44
+ print("Continuing with demonstration of profiling structure...")
45
+ system_available = False
46
+
47
+ if not system_available:
48
+ print("\n" + "=" * 60)
49
+ print("PROFILING TEMPLATE STRUCTURE")
50
+ print("=" * 60)
51
+ print("1. Import cProfile and pstats")
52
+ print("2. Initialize system WITHOUT profiling")
53
+ print("3. Start profiler BEFORE io4edge_client calls")
54
+ print("4. Execute your io4edge_client operations")
55
+ print("5. Stop profiler and analyze results")
56
+ print("6. Filter results for ekfsm|io4edge_client modules")
57
+ return
58
+
59
+ # SCHRITT 2: Profiling starten - NACH System-Setup, VOR io4edge_client Aufrufen
60
+ print("Starting profiler...")
61
+ profiler = cProfile.Profile(builtins=False)
62
+ profiler.enable()
63
+
64
+ try:
65
+ # SCHRITT 3: Ihre io4edge_client/ekfsm Operationen hier
66
+ print("Executing monitored operations...")
67
+
68
+ # Beispiel-Operationen (passen Sie diese an Ihr Script an):
69
+
70
+ # System-Operationen
71
+ system.print()
72
+
73
+ # Beispiel: CPU-Zugriff
74
+ cpu = system["CPU"] # Ändern Sie "CPU" entsprechend Ihrer Konfiguration
75
+ cpu.print()
76
+
77
+ # Beispiel: Hardware-Module Zugriff
78
+ # board = system["your_board_name"]
79
+ # i4e = board.your_io4edge_device
80
+
81
+ # Beispiel: io4edge_client Operationen
82
+ # i4e.watchdog.kick()
83
+ # i4e.leds.led1.set(0, True)
84
+ # button_array = i4e.buttons
85
+ # button_array.some_button.handler = lambda: print("Button pressed")
86
+
87
+ # Beispiel: Streaming-Operationen
88
+ # stop_event = threading.Event()
89
+ # button_thread = threading.Thread(target=button_array.read, args=(stop_event,))
90
+ # button_thread.start()
91
+ # time.sleep(5) # Simulate some work
92
+ # stop_event.set()
93
+ # button_thread.join()
94
+
95
+ print("Operations completed successfully")
96
+
97
+ except Exception as e:
98
+ print(f"Error during monitored operations: {e}")
99
+
100
+ finally:
101
+ # SCHRITT 4: Profiling stoppen und analysieren
102
+ profiler.disable()
103
+
104
+ print("\n" + "=" * 80)
105
+ print("PROFILING RESULTS - ekfsm and io4edge_client modules")
106
+ print("=" * 80)
107
+
108
+ # Stats-Objekt erstellen
109
+ stats = pstats.Stats(profiler)
110
+ stats.strip_dirs()
111
+
112
+ # SCHRITT 5: Analysieren Sie die Ergebnisse
113
+
114
+ print("\n1. TOP FUNCTIONS BY TOTAL TIME")
115
+ # Passen Sie den Regex-Filter an Ihre spezifischen Module an
116
+ stats.sort_stats("tottime").print_stats(r"ekfsm|io4edge_client|your_module", 20)
117
+
118
+ print("\n2. TOP FUNCTIONS BY CUMULATIVE TIME")
119
+ stats.sort_stats("cumtime").print_stats(r"ekfsm|io4edge_client|your_module", 20)
120
+
121
+ print("\n3. TOP FUNCTIONS BY NUMBER OF CALLS")
122
+ stats.sort_stats("ncalls").print_stats(r"ekfsm|io4edge_client|your_module", 15)
123
+
124
+ print("\n4. ALL FUNCTIONS OVERVIEW")
125
+ stats.sort_stats("tottime").print_stats(30)
126
+
127
+ # SCHRITT 6: Profiling-Datei speichern für detaillierte Analyse
128
+ profile_file = Path(__file__).parent / "your_script_profile.prof"
129
+ profiler.dump_stats(str(profile_file))
130
+
131
+ print(f"\n5. PROFILE FILE SAVED: {profile_file}")
132
+ print(f" Detailed analysis: python -m pstats {profile_file}")
133
+ print(f" Visual analysis: pip install snakeviz && snakeviz {profile_file}")
134
+
135
+ print("\n" + "=" * 80)
136
+
137
+
138
+ def create_profile_analysis_script(script_name):
139
+ """
140
+ Erstellt ein Analyse-Script für ein spezifisches Profiling
141
+ """
142
+ analysis_script = f"""#!/usr/bin/env python3
143
+ '''
144
+ Analysis script for {script_name}_profile.prof
145
+ '''
146
+
147
+ import pstats
148
+ from pathlib import Path
149
+
150
+ def analyze_{script_name}_profile():
151
+ profile_file = Path(__file__).parent / "{script_name}_profile.prof"
152
+
153
+ if not profile_file.exists():
154
+ print(f"Profile file not found: {{profile_file}}")
155
+ return
156
+
157
+ stats = pstats.Stats(str(profile_file))
158
+ stats.strip_dirs()
159
+
160
+ print("="*80)
161
+ print("DETAILED ANALYSIS OF {script_name.upper()} PROFILING")
162
+ print("="*80)
163
+
164
+ # Modulspezifische Analysen
165
+ print("\\n1. EKFSM MODULE ANALYSIS")
166
+ stats.sort_stats("tottime").print_stats(r"ekfsm", 15)
167
+
168
+ print("\\n2. IO4EDGE_CLIENT MODULE ANALYSIS")
169
+ stats.sort_stats("tottime").print_stats(r"io4edge_client", 15)
170
+
171
+ # Fügen Sie hier weitere spezifische Analysen ein
172
+
173
+ if __name__ == "__main__":
174
+ analyze_{script_name}_profile()
175
+ """
176
+
177
+ analysis_file = Path(__file__).parent / f"analyze_{script_name}_profile.py"
178
+ analysis_file.write_text(analysis_script)
179
+ print(f"Analysis script created: {analysis_file}")
180
+
181
+
182
+ if __name__ == "__main__":
183
+ print("PROFILING TEMPLATE FOR EKFSM AND IO4EDGE_CLIENT")
184
+ print("=" * 50)
185
+ profile_ekfsm_io4edge_operations()
186
+
187
+ # Optional: Erstellen Sie ein Analyse-Script
188
+ # create_profile_analysis_script("your_script_name")
@@ -0,0 +1,112 @@
1
+ import logging
2
+ import pprint
3
+ from pathlib import Path
4
+ import cProfile
5
+ import pstats
6
+
7
+ from ekfsm.system import System
8
+
9
+ logging.basicConfig(
10
+ level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
11
+ )
12
+
13
+ # Initialize system first (without profiling the setup)
14
+ config = Path(__file__).parent / "sq3-only.yaml"
15
+ system = System(config, abort=True)
16
+
17
+ pprint.pprint(f"System slots {system.slots}")
18
+
19
+ system.print()
20
+
21
+ cpu = system["CPU"]
22
+ cpuB = system.cpu
23
+ cpuC = system[0]
24
+
25
+ assert cpu == cpuB == cpuC
26
+
27
+ print(cpu.hwmon.cputemp())
28
+
29
+ eeprom = cpu.eeprom
30
+ eeprom.manufactured_at()
31
+
32
+ cpu_slot = system.slots["SYSTEM_SLOT"]
33
+ cpu_slotB = system.slots.SYSTEM_SLOT
34
+ cpu_slotC = system.slots[0]
35
+
36
+ assert cpu_slot == cpu_slotB == cpu_slotC
37
+
38
+ cpu.print()
39
+ print(f"probing CPU: {cpu.probe()}")
40
+ print(
41
+ f"inventory: {cpu.inventory.vendor()} {cpu.inventory.model()} {cpu.inventory.serial()}"
42
+ )
43
+
44
+ sq3 = system["info"]
45
+ i4e = sq3.bmc
46
+
47
+ # Start profiling HIER - nach System-Setup, vor io4edge_client Aufrufen
48
+ profiler = cProfile.Profile(builtins=False)
49
+ profiler.enable()
50
+
51
+ fw_title, fw_name = i4e.identify_firmware()
52
+
53
+ print(f"Firmware: {fw_title} {fw_name}")
54
+
55
+ pixel = i4e.display
56
+
57
+ pixel.off()
58
+ pixel.display_image(str(Path(__file__).parent / "sim/SQ3.png"))
59
+
60
+
61
+ profiler.disable()
62
+
63
+ print("\n" + "=" * 80)
64
+ print("PROFILING RESULTS - ekfsm and io4edge_client modules")
65
+ print("=" * 80)
66
+
67
+ # Create stats object and filter for our modules
68
+ stats = pstats.Stats(profiler)
69
+ stats.strip_dirs() # clean paths
70
+
71
+ # Print comprehensive profiling results
72
+ print("\n1. TOP FUNCTIONS BY TOTAL TIME (including subcalls)")
73
+ stats.sort_stats("tottime").print_stats(
74
+ r"ekfsm|io4edge_client|client\.py|display|button", 30
75
+ )
76
+
77
+ print("\n2. TOP FUNCTIONS BY CUMULATIVE TIME (time + subcalls)")
78
+ stats.sort_stats("cumtime").print_stats(
79
+ r"ekfsm|io4edge_client|client\.py|display|button", 30
80
+ )
81
+
82
+ print("\n3. TOP FUNCTIONS BY NUMBER OF CALLS")
83
+ stats.sort_stats("ncalls").print_stats(
84
+ r"ekfsm|io4edge_client|client\.py|display|button", 20
85
+ )
86
+
87
+ print("\n3a. ALL FUNCTIONS - DEBUGGING VIEW (to see what's actually being called)")
88
+ stats.sort_stats("tottime").print_stats(50) # Show top 50 functions overall
89
+
90
+ print("\n4. CALLERS/CALLEES ANALYSIS FOR TOP 5 FUNCTIONS")
91
+ # Get the top 5 functions by total time
92
+ top_funcs = stats.get_stats_profile().func_profiles
93
+ filtered_funcs = {
94
+ k: v
95
+ for k, v in top_funcs.items()
96
+ if any(mod in str(k) for mod in ["ekfsm", "io4edge_client"])
97
+ }
98
+ sorted_funcs = sorted(filtered_funcs.items(), key=lambda x: x[1].tottime, reverse=True)
99
+
100
+ for i, (func_key, func_stats) in enumerate(sorted_funcs[:5]):
101
+ print(f"\n--- Function #{i+1}: {func_key} ---")
102
+ print(f"Total time: {func_stats.tottime:.6f}s, Calls: {func_stats.ncalls}")
103
+ stats.print_callers(func_key)
104
+
105
+ # Save detailed profile to file for later analysis
106
+ profile_file = Path(__file__).parent / "sq3_profile.prof"
107
+ profiler.dump_stats(str(profile_file))
108
+ print(f"\n5. Detailed profile saved to: {profile_file}")
109
+ print(" Use: python -m pstats sq3_profile.prof")
110
+ print(" Or: snakeviz sq3_profile.prof (install: pip install snakeviz)")
111
+
112
+ print("\n" + "=" * 80)