prock icon indicating copy to clipboard operation
prock copied to clipboard

Feature Request - Record Session and Playback

Open Dragonsong3k opened this issue 4 months ago • 2 comments

I would like to be able to record the session to a file and then play it back.

Dragonsong3k avatar Jul 15 '26 17:07 Dragonsong3k

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:

  1. Time travel - an ability to quickly go back and forth in time when you have the recording.
  2. 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.

matrohin avatar Jul 17 '26 18:07 matrohin

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.

matrohin avatar Jul 19 '26 21:07 matrohin