sholloway / agents-playground

MIT License
4 stars 0 forks source link

Scheduled Events Visualization #33

Open sholloway opened 2 years ago

sholloway commented 2 years ago

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 Diagram

Timing Diagrams Considerations

What to visualize?

Challenges

Use Case

  1. User launches a sim.
  2. The user toggles statistic collection in the simulation toolbar. The default is that it's off.
  3. User clicks the start button.
  4. When the start button is clicked, the event loop starts and data collection starts.
  5. When the stop button is clicked data collection is ended.
  6. 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:

Visualization Options

sholloway commented 2 years ago

Before going any further down this rabbit hole, let's see what can be accomplished with generating a flame graph using py-spy.