diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2018-04-23 21:20:39 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-04-23 21:20:39 +0800 |
commit | e7067be94f0edb47b39d4fa1725bce18bdadf122 (patch) | |
tree | 03da66169154814fd5eee6a4aba2b2a3790ff739 /vendor/github.com/fjl/memsize/doc.go | |
parent | 9586f2acc76f10c4a7ce364291d075997c5f8eff (diff) | |
download | go-tangerine-e7067be94f0edb47b39d4fa1725bce18bdadf122.tar.gz go-tangerine-e7067be94f0edb47b39d4fa1725bce18bdadf122.tar.zst go-tangerine-e7067be94f0edb47b39d4fa1725bce18bdadf122.zip |
cmd/geth, mobile: add memsize to pprof server (#16532)
* cmd/geth, mobile: add memsize to pprof server
This is a temporary change, to be reverted before the next release.
* cmd/geth: fix variable name
Diffstat (limited to 'vendor/github.com/fjl/memsize/doc.go')
-rw-r--r-- | vendor/github.com/fjl/memsize/doc.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/fjl/memsize/doc.go b/vendor/github.com/fjl/memsize/doc.go new file mode 100644 index 000000000..640cfba5e --- /dev/null +++ b/vendor/github.com/fjl/memsize/doc.go @@ -0,0 +1,16 @@ +/* +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 |