You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples of client instantiation, datafile management and Feature enabled are provided in main.go
5
4
6
-
DATAFILES_DIR env var has to be set to point to the path where 100_entities.json is located
5
+
# Profiling
6
+
7
+
Prerequisite:
8
+
1.`go get github.com/pkg/profile`
9
+
2. DATAFILES_DIR env var has to be set to point to the path where 100_entities.json is located
7
10
8
11
* CPU profile. Execute: `go build -ldflags "-X main.ProfileMode=cpu" main_profile_feature.go && ./main_profile_feature`. It will create cpu.pprof file in your current directory. Then run: `go tool pprof -http=:8080 cpu.pprof` and profile cpu usage using web browser.
9
12
* Memory profile. Execute: `go build -ldflags "-X main.ProfileMode=mem" main_profile_feature.go.go && ./main_profile_feature`. It will create mem.pprof file in your current directory. Then run: `go tool pprof -http=:8080 mem.pprof` and profile memory using browser.
0 commit comments