Skip to content

Commit 2c33873

Browse files
added a short description for examples in main.
1 parent 551495a commit 2c33873

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Optimizely Go SDK Examples
22

3-
### Profiling
4-
Prerequisite: `go get github.com/pkg/profile`
3+
Examples of client instantiation, datafile management and Feature enabled are provided in main.go
54

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
710

811
* 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.
912
* 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

Comments
 (0)