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

package weed_server
import (
"sync/atomic"
"time"
"github.com/seaweedfs/seaweedfs/weed/stats"
)
func (fs *FilerServer) loopUpdateMetric() {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for range ticker.C {
inFlightDataSize := atomic.LoadInt64(&fs.inFlightDataSize)
stats.FilerInFlightDataSizeGauge.Set(float64(inFlightDataSize))
}
}