Skip to content

Commit d88d6f9

Browse files
committed
Add pprof
1 parent 6b54cb4 commit d88d6f9

File tree

14 files changed

+1270
-26
lines changed

14 files changed

+1270
-26
lines changed

Gopkg.lock

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+8
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,11 @@
9292
[[constraint]]
9393
branch = "master"
9494
name = "github.com/getsentry/raven-go"
95+
96+
[[constraint]]
97+
branch = "master"
98+
name = "github.com/mistifyio/negroni-pprof"
99+
100+
[[constraint]]
101+
branch = "master"
102+
name = "github.com/gohttp/pprof"

benchmark/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Benchmark with vegeta
2+
3+
```
4+
go get -u github.com/tsenart/vegeta
5+
vegeta attack -targets ./postEvaluation.target -body ./postEvaluation.json -output ./postEvaluation.output -workers 1000
6+
```
7+
8+
```
9+
Requests [total, rate] 56521, 2000.04
10+
Duration [total, attack, wait] 28.2603654s, 28.259999871s, 365.529µs
11+
Latencies [mean, 50, 95, 99, max] 371.632µs, 327.991µs, 614.918µs, 1.385568ms, 12.50012ms
12+
Bytes In [total, mean] 23250552, 411.36
13+
Bytes Out [total, mean] 8308587, 147.00
14+
Success [ratio] 100.00%
15+
Status Codes [code:count] 200:56521
16+
Error Set:
17+
```
18+
19+
## Getting the flamegraph from go-torch
20+
21+
```
22+
go-torch -u http://localhost:18000/
23+
```
24+
25+
![torch.svg](./torch.svg)

benchmark/postEvaluation.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"entityID": "123",
3+
"entityType": "report",
4+
"entityContext": {
5+
"dl_state": "CA"
6+
},
7+
"flagID": 2,
8+
"enableDebug": true
9+
}

benchmark/postEvaluation.output

1.94 MB
Binary file not shown.

benchmark/postEvaluation.target

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POST http://localhost:18000/api/evaluation
2+
Content-Type: application/json

0 commit comments

Comments
 (0)