[HttpClient] Warmup measurements might be off

Open
#1,988 3 comments 0 reactions 1 assignee View on GitHub

@CarnaViire is already working on this.

Since May 31, 2024.

Assessment

This issue has not been assessed yet.

Description

If ran locally and with some of the tracing on, the client fairly often reports this exception:

Unhandled exception: System.Exception: No successful requests during warmup.
   at HttpClientBenchmarks.Program.Measure(Func`1 sendAsync) in /home/manicka/repositories/aspnet-benchmarks/src/BenchmarksApps/HttpClientBenchmarks/Clients/HttpClient/Program.cs:line 312
   at HttpClientBenchmarks.Program.RunScenario() in /home/manicka/repositories/aspnet-benchmarks/src/BenchmarksApps/HttpClientBenchmarks/Clients/HttpClient/Program.cs:line 222
   at HttpClientBenchmarks.Program.<>c.<<Main>b__14_0>d.MoveNext() in /home/manicka/repositories/aspnet-benchmarks/src/BenchmarksApps/HttpClientBenchmarks/Clients/HttpClient/Program.cs:line 58
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass26_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass24_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__23_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__8_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__7_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseExceptionHandler>b__0>d.MoveNext()

While I clearly see in the logs, that requests were exchange with the server.

Note that the client's Main was altered to start with:

public static async Task<int> Main(string[] args)
{
    using var _ = new TestEventListener(Console.Out, "Private.InternalDiagnostics.System.Net.Quic", "Private.InternalDiagnostics.System.Net.Http");
    ...

/cc @CarnaViire

Dominant language
C#
Stars
1.2k
Forks
244
Avg merge
4d 4h
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aspnet/Benchmarks

All issues in aspnet/Benchmarks

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.