mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
accounting: change stats interface
This is done to make clear ownership over accounting object and prepare for removing global stats object. Stats elapsed time calculation has been altered to account for actual transfer time instead of stats creation time.
This commit is contained in:
committed by
Nick Craig-Wood
parent
2d561b51db
commit
be0464f5f1
@@ -187,8 +187,8 @@ func (s *server) serveFile(w http.ResponseWriter, r *http.Request, remote string
|
||||
}()
|
||||
|
||||
// Account the transfer
|
||||
accounting.Stats.Transferring(remote)
|
||||
defer accounting.Stats.DoneTransferring(remote, true)
|
||||
tr := accounting.Stats.NewTransfer(obj)
|
||||
defer tr.Done(nil)
|
||||
// FIXME in = fs.NewAccount(in, obj).WithBuffer() // account the transfer
|
||||
|
||||
// Serve the file
|
||||
|
||||
Reference in New Issue
Block a user