1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-02 16:43:28 +00:00

rc: add srcFs and dstFs to core/stats and core/transferred stats

Before this change it wasn't possible to see where transfers were
going from and to in core/stats and core/transferred.

When use in rclone mount in particular this made interpreting the
stats very hard.
This commit is contained in:
Nick Craig-Wood
2024-01-18 16:44:13 +00:00
parent 81a29e6895
commit 91b54aafcc
16 changed files with 137 additions and 40 deletions

View File

@@ -183,7 +183,7 @@ func TestMultithreadCopy(t *testing.T) {
require.NoError(t, err)
accounting.GlobalStats().ResetCounters()
tr := accounting.GlobalStats().NewTransfer(src)
tr := accounting.GlobalStats().NewTransfer(src, nil)
defer func() {
tr.Done(ctx, err)
@@ -284,7 +284,7 @@ func TestMultithreadCopyAbort(t *testing.T) {
src, err := r.Flocal.NewObject(ctx, fileName)
require.NoError(t, err)
accounting.GlobalStats().ResetCounters()
tr := accounting.GlobalStats().NewTransfer(src)
tr := accounting.GlobalStats().NewTransfer(src, nil)
defer func() {
tr.Done(ctx, err)