cmd/syncthing, gui: Improve completion calculation (fixes #3492)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3493
This commit is contained in:
Jakob Borg
2016-08-12 06:41:43 +00:00
committed by Audrius Butkevicius
parent 7114cacb85
commit 7776839c82
5 changed files with 49 additions and 59 deletions

View File

@@ -207,9 +207,11 @@ func (c *folderSummaryService) sendSummary(folder string) {
// remote device.
comp := c.model.Completion(devCfg.DeviceID, folder)
events.Default.Log(events.FolderCompletion, map[string]interface{}{
"folder": folder,
"device": devCfg.DeviceID.String(),
"completion": comp,
"folder": folder,
"device": devCfg.DeviceID.String(),
"completion": comp.CompletionPct,
"needBytes": comp.NeedBytes,
"globalBytes": comp.GlobalBytes,
})
}
}