-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Replace ISystemClock with TimeProvider in Kestrel #48081
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
src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs
Outdated
Show resolved
Hide resolved
will we eventually have only one TestTimeProvider? looks like 4 are copies, plus the SignalR one is possibly mergeable edit: never mind, you answered that already 😄 |
/benchmarks |
Crank Pull Request Bot
Benchmarks:
Profiles:
Components:
Arguments: any additional arguments to pass through to crank, e.g. |
/benchmark plaintext aspnet-citrine-lin kestrel |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel. Logs: link |
/benchmark plaintext aspnet-citrine-lin kestrel |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel. Logs: link |
I got rid of two custom time providers in this PR, one in product code and one test. Once this review is done I can look at reconciling across AspNetCore. Update I got rid of all duplicate test time providers in AspNetCore. |
/benchmark plaintext aspnet-citrine-lin kestrel |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel. Logs: link |
/benchmark plaintext aspnet-citrine-lin kestrel --application.sdkVersion 8.0.100-preview.5.23260.3 |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel and arguments |
|
/benchmark plaintext aspnet-citrine-lin kestrel --application.sdkVersion 8.0.100-preview.5.23260.3 |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel and arguments |
The few metrics that looked concerning are unstable across runs. I think this is good as far as perf goes. |
src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeExtensions.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeExtensions.cs
Outdated
Show resolved
Hide resolved
/benchmark plaintext aspnet-citrine-lin kestrel --application.sdkVersion 8.0.100-preview.5.23260.3 |
Benchmark started for plaintext on aspnet-citrine-lin with kestrel and arguments |
Fixes #47472
Fixes #13628
This replaces the internal ISystemClock types with the new TimeProvider abstraction. I also included #13628 which switches most operations to timestamps instead of utc dates, which may clean up the code a bit and allow for other micro-optimizations by working more directly with longs than DateTimeOffset.
Fixes #37862 (quarantined test which hasn't failed in 30+ days)