torrent/struct_test.go

13 lines
245 B
Go
Raw Normal View History

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