Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua CAN relay performance #5940

Open
rusefillc opened this issue Feb 13, 2024 · 3 comments
Open

lua CAN relay performance #5940

rusefillc opened this issue Feb 13, 2024 · 3 comments
Assignees

Comments

@rusefillc
Copy link
Contributor

rusefillc commented Feb 13, 2024

scripts at https://github.com/rusefi/rusefi_documentation/tree/master/OEM-Docs/VAG/2006-Passat-B6/HOWTO

actual traces with different editions of scripts https://github.com/rusefi/rusefi_documentation/tree/master/OEM-Docs/VAG/2006-Passat-B6/2024.02

I am trying to execute lua at 100Hz in order to send MOTOR_1 640/0x280 at 100hz
traces show that MOTOR_1 is only send out at ~12hz

now comes a red flag
for one "onTick" invocation we consume 100 RX packets and we spend roughly 0.5ms per packet

2024-02-13_10_03_07_456: EngineState: LUA: RPM=0.0000000 TPS=0.0000000
2024-02-13_10_03_07_556: EngineState: rx total/recent 65070 108
2024-02-13_10_03_07_557: EngineState: luaCycle 49792us including luaRxTime 49756us
2024-02-13_10_03_07_557: EngineState: Lua memory heap usage: 29937 / 100000 bytes = 29.9%
2024-02-13_10_03_07_558: EngineState: confirmation_luamemory:9
rusefillc pushed a commit to rusefi/can-log-tools that referenced this issue Feb 13, 2024
rusefillc pushed a commit to rusefi/rusefi_documentation that referenced this issue Feb 13, 2024
@rusefillc
Copy link
Contributor Author

rusefillc added a commit to rusefi/rusefi_documentation that referenced this issue Feb 13, 2024
@rusefillc
Copy link
Contributor Author

just double-checked see rusefi/rusefi_documentation@df18c0f

even WITHOUT tx i get

2024-02-13_14_02_13_294: EngineState: LUA: Total from vehicle 63326 from TCU 10093 dropped=0 replaced 0
2024-02-13_14_02_13_603: EngineState: LUA: TCU isShiftActive=0 tcuError=1 EGSRequirement=1
2024-02-13_14_02_13_695: EngineState: rx total/recent 73918 12
2024-02-13_14_02_13_696: EngineState: luaCycle 4363us including luaRxTime 4327us
2024-02-13_14_02_13_696: EngineState: Lua memory heap usage: 23786 / 100000 bytes = 23.7%
2024-02-13_14_02_13_697: EngineState: confirmation_luamemory:9
2024-02-13_14_02_14_099: EngineState: LUA: TCU isShiftActive=0 tcuError=1 EGSRequirement=1
2024-02-13_14_02_14_296: EngineState: LUA: Total from vehicle 64494 from TCU 10296 dropped=0 replaced 0
2024-02-13_14_02_14_593: EngineState: LUA: TCU isShiftActive=0 tcuError=1 EGSRequirement=1
2024-02-13_14_02_14_593: EngineState: rx total/recent 75062 13
2024-02-13_14_02_14_594: EngineState: luaCycle 4601us including luaRxTime 4578us
2024-02-13_14_02_14_594: EngineState: Lua memory heap usage: 23854 / 100000 bytes = 23.8%
2024-02-13_14_02_14_606: EngineState: confirmation_luamemory:9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants