Skip to content

Commit 4e84f43

Browse files
author
anjmao
committed
update readme
1 parent 7a1e97e commit 4e84f43

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ Test http client, object serialize and deserialize and file descriptor leeks.
55
Each service has `/test` endpoint which calls another api using http client and returns that api response as JSON.
66

77
## Start containers
8+
89
`docker-compose up --build`
910

10-
## Run load test
11+
docker-compose should start 3 containers
12+
1) go lang api with GET `/data` endpoint
13+
2) go lang api with GET `/test` endpoint which calls 1 endpoint
14+
3) .net core api with GET `/test` endpoint which calls 1 endpoint
15+
16+
## Run load tests
1117

1218
```
1319
brew install wrk
14-
// now go to wrk folder and run
15-
make run
20+
cd wrk
21+
// .net core
22+
URL=http://localhost:5000 make run
23+
24+
// golang
25+
URL=http://localhost:5001 make run
1626
```
1727

1828
## Check for file descriptors leeks
@@ -25,7 +35,7 @@ Count TIME_WAIT state
2535

2636
## Results
2737

28-
### .net core api
38+
### .net core api (http://localhost:5000)
2939

3040
```
3141
wrk --connections 256 --duration 100s --threads 8 --timeout 5s --latency --script /Users/anma/go/src/github.com/anjmao/netcore-vs-golang/wrk/requests.lua http://localhost:5000
@@ -52,7 +62,7 @@ MEMORY: 90MB
5262
TIME_WAIT file descriptors: ~3000
5363
```
5464

55-
### golang api
65+
### golang api (http://localhost:5001)
5666

5767
```
5868
wrk --connections 256 --duration 100s --threads 8 --timeout 5s --latency --script /Users/anma/go/src/github.com/anjmao/netcore-vs-golang/wrk/requests.lua http://localhost:5001
@@ -79,3 +89,8 @@ MEMORY: 10MB
7989
TIME_WAIT file descriptors: 4
8090
```
8191

92+
## My machine spec
93+
94+
MacBook Pro (15-inch, 2017)
95+
Processor 2,9 GHz Intel Core i7
96+
Memory 16 GB 2133 MHz LPDDR3

0 commit comments

Comments
 (0)