-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ee0a37
commit 92a17ea
Showing
2 changed files
with
21 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,22 @@ | ||
# ad-server | ||
advertising server | ||
# the third lib | ||
- github.com/ibbd-dev/go-async-log | ||
- github.com/satori/go.uuid | ||
- github.com/spf13/viper | ||
# benchmark | ||
## Hardware | ||
# Getting Start | ||
- install go and glide env | ||
- cp -f mirrors.yaml ~/.glide/ | ||
- glide install | ||
- go build -o ad_server main/main.go | ||
- ./ad_server | ||
# Benchmark | ||
#### Hardware | ||
CPU: 12 cores<br> | ||
Memory: 64G | ||
## Results: | ||
Used Connections: 1000<br> | ||
Used Threads: 12<br> | ||
Total number of calls: 1000000<br> | ||
|
||
===========================TIMINGS===========================<br> | ||
Total time passed: 46.59s<br> | ||
Avg time per request: 44.09ms<br> | ||
Requests per second: 21464.89<br> | ||
Median time per request: 42.80ms<br> | ||
99th percentile time: 63.66ms<br> | ||
Slowest time for request: 3002.00ms<br> | ||
|
||
=============================DATA=============================<br> | ||
Total response body sizes: 1202000594<br> | ||
Avg response body per request: 1202.00ms<br> | ||
Transfer rate per second: 25800812.03 Byte/s (25.80 MByte/s)<br> | ||
==========================RESPONSES==========================<br> | ||
20X Responses: 999998 (100.00%)<br> | ||
30X Responses: 0 (0.00%)<br> | ||
40X Responses: 0 (0.00%)<br> | ||
50X Responses: 0 (0.00%)<br> | ||
Errors: 2 (0.00%)<br> | ||
#### Benchmark Input | ||
./hey -n 1000000 -c 2000 "http://localhost:8001/ad/search?slot_id=2&ad_num=1&ip=101.88.50.181&device_id=0x22q53&os=1&os_version=1.0.0" | ||
#### Benchmark Result: | ||
- Total: 24.3260 secs | ||
- Slowest: 0.7821 secs | ||
- Fastest: 0.0002 secs | ||
- Average: 0.0467 secs | ||
- Requests/sec: 41108.3054 | ||
- Total data: 1201899425 bytes | ||
- Size/request: 1201 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# 下面这两行是为了下载编译依赖,只有首次编译或者依赖更新时才需要执行。 | ||
#cp -f mirrors.yaml ~/.glide/ | ||
#glide install | ||
# 下面这2行是为了下载编译依赖,只有首次编译或者依赖更新时才需要执行。 | ||
# cp -f mirrors.yaml ~/.glide/ | ||
# glide install | ||
|
||
go build -o ad_server main/main.go |