You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a bit of hack (adding some global variables to the sync package) but it gets us information easily.
Would the runtime team be interested in adding this sort of information more officially via the runtime/metrics package?
We know about the "block" and "mutex" pprof types, but they're a bit more tedious to use to just get a counter.
Our use case is: we have a server that with some very hot mutexes and we want to high level metric showing how happy it is that'll become unhappy looking if people add too much code in the critical section.
The text was updated successfully, but these errors were encountered:
If you have a concrete implementation in mind and want to send a patch, I'm happy to review the changes. Otherwise I'll try to get around to it this cycle, but no promises. I was planning on adding some GC CPU counters this dev cycle, along with maybe a few more scheduling metrics.
Just to be concrete, if I understand correctly, a mutex profile would work here, but you are looking for a general "contention level/rate" counter that can be easily monitored via a monitoring system, which could alert you that you may want to look at an actual profile.
We modified the runtime & sync package a bit to add counters when a
sync.Mutex.Lock
andsync.RWMutex.RLock
call go into their slow paths:tailscale@effe2d1 (corp CLA on file; same license as Go)
That's a bit of hack (adding some global variables to the sync package) but it gets us information easily.
Would the runtime team be interested in adding this sort of information more officially via the
runtime/metrics
package?We know about the "block" and "mutex" pprof types, but they're a bit more tedious to use to just get a counter.
Our use case is: we have a server that with some very hot mutexes and we want to high level metric showing how happy it is that'll become unhappy looking if people add too much code in the critical section.
The text was updated successfully, but these errors were encountered: