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

Implement frame rate monitor #88

Open
davidcutting42 opened this issue Nov 21, 2020 · 6 comments
Open

Implement frame rate monitor #88

davidcutting42 opened this issue Nov 21, 2020 · 6 comments
Labels
Enhancement New feature or request Needs Clarification Need more information from the requestor
Milestone

Comments

@davidcutting42
Copy link

davidcutting42 commented Nov 21, 2020

From #66

@davidcutting42 davidcutting42 added Enhancement New feature or request Needs Clarification Need more information from the requestor labels Nov 21, 2020
@davidcutting42 davidcutting42 added this to the v3.1.0 milestone Nov 21, 2020
@Asbelos
Copy link
Contributor

Asbelos commented Nov 22, 2020

This is really there to check we are not overloading the cpu and slowing loop calls down.
Initially i think just flipping a pin each time loop is called would be enough for soneone with an oscilloscope to monitor loop speed.

@grbba
Copy link
Contributor

grbba commented Nov 22, 2020

Which loop would you measure ? there are many loops at the end all trying to play nice with each other but still you may get fluctuations in the 'frame-rate'. Giving the fact that 99% of all users may not have an Ozilloscope isn't that more a feature for development ? What would be the use case i.e. why as a user I would/do need it ?

@Asbelos
Copy link
Contributor

Asbelos commented Nov 22, 2020 via email

@Asbelos
Copy link
Contributor

Asbelos commented Dec 6, 2020

Interestingly, the main track sentResetsSincePacket counter can be used to detect loop speed issues as this indicates that the reminder code is not being called often enough to keep the waveform busy. (Assuming at least 1 loco in reminders)

@Asbelos
Copy link
Contributor

Asbelos commented Dec 7, 2020

Interestingly... once there is at least one loco in the reminders table, then the existing idle/reset counter for the main track will only increase if fhe main loop is too slow to keep the waveform supplied with reminder packets. Being able to display this value would be useful and easy.

@Neil-McK
Copy link
Contributor

Neil-McK commented Feb 16, 2023

I believe that the loop time monitor in CS may fulfil the original request here. It is enabled by #define IO_LOOPTIMES in the config.h and, when enabled, it outputs something similar to the following every 5 seconds:
<* Loop Total:102us (264us max) HAL:30us (104us max) *> (basic system)
<* Loop Total:292us (2376us max) HAL:70us (688us max) *> (system with lots of devices and automation installed)
The loop total is the time taken for the CommandStation's main loop() function to execute (including all sub-loops). If any of the CS functions is taking too long at the loop() level then this figure will be high. Typically, Serial I/O and WiFi operations give increased figures. The HAL figures relate to the IODevice::loop() function on its own, and indicate whether the problem might arise from a HAL device (user-written or otherwise).

daniviga pushed a commit to daniviga/CommandStation-EX that referenced this issue Mar 26, 2023
* Fix broken internal links

* Use :doc: and :ref: for internal links

Sphinx will check them and they will work for builders other than HTML.

* Fix WARNING: Duplicate explicit target name: "here".

* Fix section headings

* Suppress autosectionlabel warnings

WARNING: undefined label:

* Exclude placeholder pages

* Fail build on Sphinx warnings

But only after getting to the end to allow all problems to be reported.

* Fix WARNING: Explicit markup ends without a blank line; unexpected unindent.

Co-authored-by: Kebbin <[email protected]>
Co-authored-by: Fred <[email protected]>
daniviga pushed a commit to daniviga/CommandStation-EX that referenced this issue Mar 26, 2023
External link from Power Supplies to Mark Gurries' site has moved.

Internal link from Diagnostics <D> Command to Diagnostics D ACK Command
was not converted correctly in:
7841f9b ("Fix links and warnings (DCC-EX#88)", 2022-01-12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Needs Clarification Need more information from the requestor
Projects
None yet
Development

No branches or pull requests

4 participants