-
Notifications
You must be signed in to change notification settings - Fork 328
NEW: Add two performance tests measuring frame times #2027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| Click(mouse.leftButton, queueEventOnly: true); | ||
|
|
||
| //mouse movements for higher polling mice (66*60 ~ 4kHz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the for loop here should match the achievable event rate at the OS. So 66 here like you are using means 66 Hz. I think 500-1000 Hz is common as hardware sampling frequency. The maximum I have measured on my machine with a 8 kHZ mouse have been 5700 mouse events per second. Which means 95 mouse events per frame @60 Hz. So that would map to 95 here in this for. The outer for loop just means, lest simulate 500 frames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { | ||
| for (int i = 0; i < 500; ++i) | ||
| { | ||
| PressAndRelease(keyboard.wKey, queueEventOnly: true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand (compared to comment below), pressing W, A, S and D as well as shift and space and mouse button at a constant rate of e.g. 60 times per second is not very realistic? I would suggest to use a modulo operation here with a switch to do different input for each frame depending on a modulo computation, e.g. if (i % 60 == 0) PressSomething()
would mean I press something every 60th frame, which means once a second if playing at 60 Hz. If benchmark is targeting something specific (microbenchmark) it may make sense to stick to large data amount though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Add 2 new performance tests measuring frame times of all profiler markers found in the package.
Changes made
Testing
New tests run and seem stable.
Risk
None, just new tests
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: