I can't tell if the event scheduler is performing as expected. I need a way to help debug scheduling issues.
The current implementation is using the EDF pattern.
Perhaps a timing diagram would help.
Timing Diagrams Considerations
What to visualize?
Every time the scheduler.run() is called.
Every time a job is run.
The active number of scheduled jobs in the scheduler.
How late jobs are from being scheduled.
Challenges
How to collect the data? Store in memory, then write to a DataFrame, File, SQLite, DuckDB?
How to visualize the timing diagram?
Use Case
User launches a sim.
The user toggles statistic collection in the simulation toolbar. The default is that it's off.
User clicks the start button.
When the start button is clicked, the event loop starts and data collection starts.
When the stop button is clicked data collection is ended.
The use clicks timeline view. A window pops up and displays the timeline.
Timing Diagrams
Displays time spent in different discrete states. The system can only be in one state at a time.
For my use case, the Sim's main loop is in the states:
update mode: looping on the scheduler
running the sim_loop_tick: updating the scene graph
Visualization Options
WaveDrom can be used to generate a diagram defined in JSON.
Kroki is an editor for working with a large number of declarative graph languages.
I can't tell if the event scheduler is performing as expected. I need a way to help debug scheduling issues.
The current implementation is using the EDF pattern. Perhaps a timing diagram would help.
Timing Diagrams Considerations
What to visualize?
Challenges
Use Case
Timing Diagrams
Displays time spent in different discrete states. The system can only be in one state at a time. For my use case, the Sim's main loop is in the states:
Visualization Options