FedP2P/struct_test.go

13 lines
245 B
Go
Raw Normal View History

2020-09-29 14:24:43 +08:00
package torrent
import (
"testing"
"unsafe"
)
2020-09-29 14:42:52 +08:00
func TestStructSizes(t *testing.T) {
2020-09-29 14:37:58 +08:00
t.Log("[]*File", unsafe.Sizeof([]*File(nil)))
t.Log("Piece", unsafe.Sizeof(Piece{}))
2021-01-20 10:10:32 +08:00
t.Log("map[*peer]struct{}", unsafe.Sizeof(map[*Peer]struct{}(nil)))
2020-09-29 14:24:43 +08:00
}