-
Notifications
You must be signed in to change notification settings - Fork 153
[Stress Tester] Use new duration measurement capability of stress tester to analyse code completion durations #539
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
[Stress Tester] Use new duration measurement capability of stress tester to analyse code completion durations #539
Conversation
d9aba21
to
3fbeeba
Compare
…ter to analyse code completion durations Use the new capability of the stress tester to measure the time it took to execute code completion requests, gather that information and report an analysis on how long all code completion requests that were executed during the stress tester run took. This should allow us to verify changes to code completion don’t introduce significant regressions and will hopefully give us a way to find situations in which code completion is slower than it should be
3fbeeba
to
b860c6c
Compare
import json | ||
import os | ||
|
||
# This value was emirically determined on an iMac Pro with a fairly small sample size. |
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.
"emirically" :)
|
||
# This value was emirically determined on an iMac Pro with a fairly small sample size. | ||
# All measurements in seconds should be taken with extreme care | ||
INSTRUCTIONS_PER_SECOND = 6693088549.09358 |
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.
Could probably just round it if it doesn't really matter anyway 🤷
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.
OK, I’ve removed the decimal digits. Not sure if rounding it any further gives much benefit. Might as well use the most accurate number we have at the moment.
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.
LGTM!
Depends on swiftlang/swift-stress-tester#150
Use the new capability of the stress tester to measure the time it took to execute code completion requests, gather that information and report an analysis on how long all code completion requests that were executed during the stress tester run took.
This should allow us to verify changes to code completion don’t introduce significant regressions and will hopefully give us a way to find situations in which code completion is slower than it should be.
It looks like CI isn’t able to pick up this change as a related PR to my changes in the main Swift or the stress tester repo, so I can’t run it and see what the final results look like in CI. Instead, here’s a short teaser of what I got from determining the code completion timings locally on the
Dollar.swift
project from the source compatibility suite.