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{}))
t.Log("map[*peer]struct{}", unsafe.Sizeof(map[*peer]struct{}(nil)))
2020-09-29 06:24:43 +00:00
}