Feature Request - Record Session and Playback
I would like to be able to record the session to a file and then play it back.
A note on implementation (mostly for me): This is also needed for deterministic UI tests that I'm planning to add at some point. For the main table, system charts, per-process charts this is easy to do after some sort of serialization/deserialization system. The challenge is with the on-demand systems, e.g. getting process libraries. Right now we only do it when the user explicitly asks this and I'd like to keep it this way.
A note on scope: So for now I'd keep this minimal and have the following out-of-scope:
- Time travel - an ability to quickly go back and forth in time when you have the recording.
- On demand data in per-process windows - libraries, threads, sockets, etc.
But I'd love to have both eventually, I just need to think about this in the background first.
Here's the demo: https://github.com/user-attachments/assets/f4409999-8c98-4040-accd-b24ccb5409cb
There are some parts that I wish to improve later, e.g. right now we don't show a detailed error message on a failure to write, but the functionality works.
For the serialization part: it is backward compatible (future prock versions should read the old recordings), but I reserve the right to break it for now 😅 (at least for unstable 0.* versions of prock), just in case I haven't accounted for something.