Flow ยท Diagram Design

The Windows engine: one run, eight steps

One Windows recording Eight boxes in two rows. Top row: take the lock, start the program, choose the frame source (PresentMon if installed, otherwise a DWM thread), then the one-second loop. Bottom row: stop and clean up, choose the frames from the first source that has any (drawstress log, PresentMon, DWM samples, or an error), write the frames and summary, and recording.finish. No Instruments, no .trace: the frames come from the first source that has any. A failure at any step deletes the run's files and frees the lock. Lock Program Frame source? 1 s loop Stop and clean up Which frames? Write recording.finish make lock folderwrite our piddead owner: retakeelse: refuse start with PopenDRAWSTRESS_LOG setattach: find pid PresentMon found?yes: run itno: 1 ms DWM thread sample RSS each sstop on cancel,deadline or exit kill program treestop PresentMonon cancel: deleterun files drawstress-log,presentmon,dwm-composition,none: error frames.csv.gzsummary .jsonKEEP_RUNS cleanup add layer, contexttier, disk limit decision the choice that sets the numbers step 8 is shared with macOS