Skip to content

Add threadpool -stat #531

Description

@davidfowl

I'd like to see a summary of the queues without dumping the work items themselves:

Statistics:
              MT    Count    TotalSize Class Name
00007ff831723fb0        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Abstractions],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener+<AcceptAsync>d__13, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ff83187dc08        1          320 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection+<ProcessRequestsAsync>d__62`1[[Microsoft.AspNetCore.Hosting.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ff8316fab60       18          576 Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.IOQueue
00007ff8316a3840       31         2976 System.Threading.TimerQueueTimer
00007ff8318b7a00      102        19584 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__217`1[[Microsoft.AspNetCore.Hosting.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ff83172ef10     1030        32960 System.Threading.QueueUserWorkItemCallbackDefaultContext`1[[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ff831637ff0      999       111888 Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection
Total 2183 objects

cc @stephentoub

Activity

  1. added this to the 3.1 milestone on Oct 7, 2019
  2. modified the milestones: 3.1, 5.0 on Oct 8, 2019
  3. modified the milestones: 5.0, 6.0 on Dec 18, 2020
  4. modified the milestones: 6.0.0, 7.0.0 on Jun 21, 2021
  5. modified the milestones: 7.0.0, 8.0.0 on Sep 12, 2022
  6. modified the milestones: 8.0.0, Future on Aug 20, 2025
  7. added 3 commits that reference this issue on Feb 19, 2026
    7dd4519
    d81d780
    ff4a21e
  8. added a commit that references this issue on Feb 22, 2026
    ee380af
  9. added a commit that references this issue on Feb 24, 2026
    1373582
  10. locked and limited conversation to collaborators on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions