-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
PresentDataRelates to the collection/analysis library (PresentData/)Relates to the collection/analysis library (PresentData/)PresentMon-ConsoleApplicationRelates to the console application (PresentMon/)Relates to the console application (PresentMon/)
Description
I wanted to see the latency between ISR of USB and when the game registers input, so I ran a wpr trace and presentmon trace at the same time.
It seems that msSinceInput reports input as happening well before the USB ISR even ran.
Presentmon:

By substracting msSinceInput from TimeInSeconds we get 2024-1-17 13:49:56.8100508
WPR:

You can see that there is a fragment every 1s while there was no input and then every 1 ms when I moved the mouse as expected.
So the first ISR caused by input happened at 2024.01.17 13:49:56.8108321.
Thats 0.7813ms AFTER what presentmon reports.
To recreate:
- run presentmon and wpr at the same time while ingame. Stay clear of any inputs for a few seconds then move your mouse
-run presentmon with -track_input and -date_time
-run wpr like this

- Look for the the first frame that received input in the presentmon report and calculate time of input by substracting msSinceInput from TimeInSeconds

- Open the wpr trace and apply this profile https://github.com/VoeSo/Twix/blob/main/fet.wpaProfile
- Expand "Interrupt", then expand the correct driver and cpu.
- Scroll down to the approximate timepoint you calculated in step 2). You will see very little interrupts and then a lot of interrupts(every 1ms for 1khz mouse). In my example you can see that there is a fragment every 1s while there was no input and then every 1 ms when I moved the mouse

- Write down the time of the first fragment caused by actual input and compare it to the time calculated in step 2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PresentDataRelates to the collection/analysis library (PresentData/)Relates to the collection/analysis library (PresentData/)PresentMon-ConsoleApplicationRelates to the console application (PresentMon/)Relates to the console application (PresentMon/)