mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
vfs: log size of File and Dir in tests for optimization
This commit is contained in:
parent
a4a6b5930a
commit
17854663de
@ -7,6 +7,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
"github.com/rclone/rclone/fs"
|
"github.com/rclone/rclone/fs"
|
||||||
"github.com/rclone/rclone/fs/operations"
|
"github.com/rclone/rclone/fs/operations"
|
||||||
@ -577,3 +578,7 @@ func TestDirRename(t *testing.T) {
|
|||||||
err = dir.Rename("potato", "tuba", dir)
|
err = dir.Rename("potato", "tuba", dir)
|
||||||
assert.Equal(t, EROFS, err)
|
assert.Equal(t, EROFS, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDirStructSize(t *testing.T) {
|
||||||
|
t.Logf("Dir struct has size %d bytes", unsafe.Sizeof(Dir{}))
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
"github.com/rclone/rclone/fs"
|
"github.com/rclone/rclone/fs"
|
||||||
"github.com/rclone/rclone/fs/operations"
|
"github.com/rclone/rclone/fs/operations"
|
||||||
@ -411,3 +412,7 @@ func TestFileRename(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestFileStructSize(t *testing.T) {
|
||||||
|
t.Logf("File struct has size %d bytes", unsafe.Sizeof(File{}))
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user