Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pkg/profile
/ ExampleMemProfile
Function
ExampleMemProfile
example_test.go:22–25 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
20
}
21
22
func
ExampleMemProfile() {
23
// use memory profiling, rather than the default cpu profiling.
24
defer
profile.Start(profile.MemProfile).Stop()
25
}
26
27
func
ExampleMemProfileRate() {
28
// use memory profiling with custom rate.
Callers
nothing calls this directly
Calls
2
Start
Function · 0.92
Stop
Method · 0.80
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…