You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
363 B

  1. package weed_server
  2. import (
  3. "sync/atomic"
  4. "time"
  5. "github.com/seaweedfs/seaweedfs/weed/stats"
  6. )
  7. func (fs *FilerServer) loopUpdateMetric() {
  8. ticker := time.NewTicker(time.Second)
  9. defer ticker.Stop()
  10. for range ticker.C {
  11. inFlightDataSize := atomic.LoadInt64(&fs.inFlightDataSize)
  12. stats.FilerInFlightDataSizeGauge.Set(float64(inFlightDataSize))
  13. }
  14. }