ipld-eth-server/vendor/github.com/fjl/memsize/doc.go
Elizabeth Engelman 36533f7c3f Update vendor directory and make necessary code changes
Fixes for new geth version
2019-09-25 16:32:27 -05:00

17 lines
564 B
Go

/*
Package memsize computes the size of your object graph.
So you made a spiffy algorithm and it works really well, but geez it's using
way too much memory. Where did it all go? memsize to the rescue!
To get started, find a value that references all your objects and scan it.
This traverses the graph, counting sizes per type.
sizes := memsize.Scan(myValue)
fmt.Println(sizes.Total)
memsize can handle cycles just fine and tracks both private and public struct fields.
Unfortunately function closures cannot be inspected in any way.
*/
package memsize