vfs: log size of File and Dir in tests for optimization

This commit is contained in:
Nick Craig-Wood 2023-03-07 09:23:09 +00:00
parent a4a6b5930a
commit 17854663de
2 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"sort"
"testing"
"time"
"unsafe"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/operations"
@ -577,3 +578,7 @@ func TestDirRename(t *testing.T) {
err = dir.Rename("potato", "tuba", dir)
assert.Equal(t, EROFS, err)
}
func TestDirStructSize(t *testing.T) {
t.Logf("Dir struct has size %d bytes", unsafe.Sizeof(Dir{}))
}

View File

@ -6,6 +6,7 @@ import (
"io"
"os"
"testing"
"unsafe"
"github.com/rclone/rclone/fs"
"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{}))
}