cmd/syncthing: Add fswatcher and remove useAPIKey stats
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4438
This commit is contained in:
parent
e70003737b
commit
55b63941b8
@ -208,9 +208,11 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
|
|||||||
"disableTempIndexes": 0,
|
"disableTempIndexes": 0,
|
||||||
"alwaysWeakHash": 0,
|
"alwaysWeakHash": 0,
|
||||||
"customWeakHashThreshold": 0,
|
"customWeakHashThreshold": 0,
|
||||||
|
"fsWatcherEnabled": 0,
|
||||||
}
|
}
|
||||||
pullOrder := make(map[string]int)
|
pullOrder := make(map[string]int)
|
||||||
filesystemType := make(map[string]int)
|
filesystemType := make(map[string]int)
|
||||||
|
var fsWatcherDelays []int
|
||||||
for _, cfg := range cfg.Folders() {
|
for _, cfg := range cfg.Folders() {
|
||||||
if cfg.ScanProgressIntervalS < 0 {
|
if cfg.ScanProgressIntervalS < 0 {
|
||||||
folderUsesV3["scanProgressDisabled"]++
|
folderUsesV3["scanProgressDisabled"]++
|
||||||
@ -233,12 +235,18 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
|
|||||||
} else if cfg.WeakHashThresholdPct != 25 {
|
} else if cfg.WeakHashThresholdPct != 25 {
|
||||||
folderUsesV3["customWeakHashThreshold"]++
|
folderUsesV3["customWeakHashThreshold"]++
|
||||||
}
|
}
|
||||||
|
if cfg.FSWatcherEnabled {
|
||||||
|
folderUsesV3["fsWatcherEnabled"]++
|
||||||
|
}
|
||||||
pullOrder[cfg.Order.String()]++
|
pullOrder[cfg.Order.String()]++
|
||||||
filesystemType[cfg.FilesystemType.String()]++
|
filesystemType[cfg.FilesystemType.String()]++
|
||||||
|
fsWatcherDelays = append(fsWatcherDelays, cfg.FSWatcherDelayS)
|
||||||
}
|
}
|
||||||
|
sort.Ints(fsWatcherDelays)
|
||||||
folderUsesV3Interface := map[string]interface{}{
|
folderUsesV3Interface := map[string]interface{}{
|
||||||
"pullOrder": pullOrder,
|
"pullOrder": pullOrder,
|
||||||
"filesystemType": filesystemType,
|
"filesystemType": filesystemType,
|
||||||
|
"fsWatcherDelays": fsWatcherDelays,
|
||||||
}
|
}
|
||||||
for key, value := range folderUsesV3 {
|
for key, value := range folderUsesV3 {
|
||||||
folderUsesV3Interface[key] = value
|
folderUsesV3Interface[key] = value
|
||||||
@ -251,7 +259,6 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
|
|||||||
"enabled": 0,
|
"enabled": 0,
|
||||||
"useTLS": 0,
|
"useTLS": 0,
|
||||||
"useAuth": 0,
|
"useAuth": 0,
|
||||||
"useAPIKey": 0,
|
|
||||||
"insecureAdminAccess": 0,
|
"insecureAdminAccess": 0,
|
||||||
"debugging": 0,
|
"debugging": 0,
|
||||||
"insecureSkipHostCheck": 0,
|
"insecureSkipHostCheck": 0,
|
||||||
@ -268,9 +275,6 @@ func reportData(cfg configIntf, m modelIntf, connectionsService connectionsIntf,
|
|||||||
if len(guiCfg.User) > 0 && len(guiCfg.Password) > 0 {
|
if len(guiCfg.User) > 0 && len(guiCfg.Password) > 0 {
|
||||||
guiStats["useAuth"]++
|
guiStats["useAuth"]++
|
||||||
}
|
}
|
||||||
if len(guiCfg.APIKey) > 0 {
|
|
||||||
guiStats["useAPIKey"]++
|
|
||||||
}
|
|
||||||
if guiCfg.InsecureAdminAccess {
|
if guiCfg.InsecureAdminAccess {
|
||||||
guiStats["insecureAdminAccess"]++
|
guiStats["insecureAdminAccess"]++
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user