English | 中文
After researching other projects' benchmarks and HTTP usage scenarios, we believe that the Echo scenario can reflect real usage scenarios. This project provides performance records for several HTTP frameworks in the Echo scenario.
Please make sure to meet the environment requirements before executing.
./scripts/benchmark_server.sh
./scripts/benchmark_client.sh
Since the default test parameters will complete a test quickly, to get a longer data collection time, you can manually adjust the test parameter n
size in ./scripts/benchmark_server.sh
.
Refer to the corresponding script for the port mapping of different servers, e.g.:
cat ./scripts/benchmark_pb.sh # ... repo=("hertz" "fasthttp" "gin" "fasthttp_timeout") ports=(8000 8001 8002 8003 8004)
After obtaining the corresponding server port, execute:
go tool pprof localhost:{port}/debug/pprof/{pprof_type}
You can also use wrk as the load generator, refer to the following command.
./scripts/benchmark_wrk.sh # parse data # ${input_file} locates in /output/$(date +%F-%H-%M).log # specify one ${output_file} python ./scripts/wrk/parse_data.py ${input_file} ${output_file} # render images python ./scripts/reports/render_images.py ${output_file}
You can also use ab as the load generator, refer to the following command.
./scripts/benchmark_ab.sh # parse data # ${input_log_file} locates in /output/$(date +%F-%H-%M).log # ${input_latency_file} folder locates in /output/latency_$(date +%F-%H-%M) # specify one ${output_file} python ./scripts/ab/parse_data.py ${input_log_file} ${input_latency_file} ${output_file} # render images (ab does not provide tp999) python ./scripts/reports/render_images.py ${output_file}
taskset
command to limit the CPUs used by the client and server. If executing on other systems, please modify the script accordingly.taskset -c ...
part of the script.Remarks:
The test data is obtained by filling the server with adequate machine resources, and therefore focuses more on server performance. Caller performance data will be provided in the future.
server
limited to 4-CPUs, client
limited to 16-CPUSRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4