feat(ursrv): new metrics based approach

This commit is contained in:
Jakob Borg
2024-09-30 14:16:27 -05:00
parent 0e68221c91
commit 4d842f7d3b
26 changed files with 867 additions and 2901 deletions
+18
View File
@@ -274,6 +274,18 @@ func (s *Service) reportData(ctx context.Context, urVersion int, preview bool) (
if cfg.Type == config.FolderTypeReceiveEncrypted {
report.FolderUsesV3.ReceiveEncrypted++
}
if cfg.SendXattrs {
report.FolderUsesV3.SendXattrs++
}
if cfg.SyncXattrs {
report.FolderUsesV3.SyncXattrs++
}
if cfg.SendOwnership {
report.FolderUsesV3.SendOwnership++
}
if cfg.SyncOwnership {
report.FolderUsesV3.SyncOwnership++
}
}
sort.Ints(report.FolderUsesV3.FsWatcherDelays)
@@ -281,6 +293,12 @@ func (s *Service) reportData(ctx context.Context, urVersion int, preview bool) (
if cfg.Untrusted {
report.DeviceUsesV3.Untrusted++
}
if cfg.MaxRecvKbps > 0 || cfg.MaxSendKbps > 0 {
report.DeviceUsesV3.UsesRateLimit++
}
if cfg.RawNumConnections > 1 {
report.DeviceUsesV3.MultipleConnections++
}
}
guiCfg := s.cfg.GUI()