mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 19:37:51 +00:00
Add some new Diagnostics metrics
This commit is contained in:
parent
32f1558737
commit
f575605bbe
1 changed files with 7 additions and 1 deletions
|
|
@ -565,6 +565,12 @@ func (s *Server) monitorDiagnostics() {
|
|||
|
||||
// monitorRuntime periodically polls the Go runtime metrics.
|
||||
func (s *Server) monitorRuntime() {
|
||||
s.Holder.Stats.Set("Host", s.Host, 1.0)
|
||||
s.Holder.Stats.Set("Cluster", strings.Join(s.Cluster.NodeSetHosts(), ","), 1.0)
|
||||
s.Holder.Stats.Set("NumNodes", strconv.Itoa(len(s.Cluster.Nodes)), 1.0)
|
||||
s.Holder.Stats.Set("NumCPU", strconv.Itoa(runtime.NumCPU()), 1.0)
|
||||
// TODO should we force this to run for diagnostics?
|
||||
|
||||
// Disable metrics when poll interval is zero.
|
||||
if s.MetricInterval <= 0 {
|
||||
return
|
||||
|
|
@ -614,7 +620,7 @@ func (s *Server) createDefaultClient() {
|
|||
s.defaultClient = &http.Client{Transport: transport}
|
||||
}
|
||||
|
||||
// CountOpenFiles on opperating systems that support lsof
|
||||
// CountOpenFiles on operating systems that support lsof.
|
||||
func CountOpenFiles() int {
|
||||
count := 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue