Skip to content
Snippets Groups Projects
  • Michael Anthony Knyszek's avatar
    63ceff95
    runtime/metrics: add /sync/mutex/wait/total:seconds metric · 63ceff95
    Michael Anthony Knyszek authored
    This change adds a metric to the runtime/metrics package which tracks
    total mutex wait time for sync.Mutex and sync.RWMutex. The purpose of
    this metric is to be able to quickly get an idea of the total mutex wait
    time.
    
    The implementation of this metric piggybacks off of the existing G
    runnable tracking infrastructure, as well as the wait reason set on a G
    when it goes into _Gwaiting.
    
    Fixes #49881.
    
    Change-Id: I4691abf64ac3574bec69b4d7d4428b1573130517
    Reviewed-on: https://go-review.googlesource.com/c/go/+/427618
    
    
    Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    63ceff95
    History
    runtime/metrics: add /sync/mutex/wait/total:seconds metric
    Michael Anthony Knyszek authored
    This change adds a metric to the runtime/metrics package which tracks
    total mutex wait time for sync.Mutex and sync.RWMutex. The purpose of
    this metric is to be able to quickly get an idea of the total mutex wait
    time.
    
    The implementation of this metric piggybacks off of the existing G
    runnable tracking infrastructure, as well as the wait reason set on a G
    when it goes into _Gwaiting.
    
    Fixes #49881.
    
    Change-Id: I4691abf64ac3574bec69b4d7d4428b1573130517
    Reviewed-on: https://go-review.googlesource.com/c/go/+/427618
    
    
    Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.