Skip to content

Commit e612ed4

Browse files
committed
chore: integrate and configure Pyroscope profiling
- Add README.md with instructions for getting started with Pyroscope - Create docker-compose.yaml with Pyroscope service configuration - Change Pyroscope server address in main.go from `http://pyroscope:4040` to `http://localhost:4040` - Adjust health check interval in docker-compose.yaml from `30s` to `5s` Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 3904298 commit e612ed4

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Get started with Pyroscope
2+
3+
Pyroscope is an open source continuous profiling platform. It will help you:
4+
5+
- Optimize your application's performance
6+
- Debug hard-to-reproduce issues
7+
- Understand your application's bottlenecks
8+
- Monitor your application's performance over time
9+
- And much more!
10+
11+
## Download and configure Pyroscope
12+
13+
```yaml
14+
services:
15+
pyroscope:
16+
image: "grafana/pyroscope:latest"
17+
ports:
18+
- "4040:4040"
19+
command:
20+
- "server"
21+
healthcheck:
22+
test: ["CMD", "curl", "-f", "http://localhost:4040/ready"]
23+
interval: 30s
24+
timeout: 10s
25+
retries: 5
26+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
pyroscope:
3+
image: "oa-mirror.mediatek.inc:5000/grafana/pyroscope:latest"
4+
ports:
5+
- "4040:4040"
6+
command:
7+
- "server"
8+
healthcheck:
9+
test: ["CMD", "curl", "-f", "http://localhost:4040/ready"]
10+
interval: 5s
11+
timeout: 10s
12+
retries: 5

example47-pyroscope-adhoc-profiling/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func main() {
5757
// pyroscope will override the server address
5858
profiler.Start(profiler.Config{
5959
ApplicationName: "adhoc.example.go",
60-
ServerAddress: "http://pyroscope:4040",
60+
ServerAddress: "http://localhost:4040",
6161
})
6262
run()
6363
}

0 commit comments

Comments
 (0)