mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 06:57:31 +00:00
metrics: move currentFDs code to the metrics package
Updates #2784 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -47,3 +47,10 @@ func (m *LabelMap) GetFloat(key string) *expvar.Float {
|
||||
m.AddFloat(key, 0.0)
|
||||
return m.Map.Get(key).(*expvar.Float)
|
||||
}
|
||||
|
||||
// CurrentFDs reports how many file descriptors are currently open.
|
||||
//
|
||||
// It only works on Linux. It returns zero otherwise.
|
||||
func CurrentFDs() int {
|
||||
return currentFDs()
|
||||
}
|
||||
|
Reference in New Issue
Block a user