programatik29 / rust-web-benchmarks

Benchmarking web frameworks written in rust with rewrk tool.
MIT License
248 stars 33 forks source link

Add explanation to benchmarks results #3

Closed shujaatak closed 2 years ago

shujaatak commented 2 years ago

It would help newbies if some explanation is added to benchmarks results like lower is better or higher is better. I think this explanation should be printed by rewrk by defualt.

programatik29 commented 2 years ago

More requests in the given time frame means that framework performs better. Which ultimately means it would require less (CPU) resources to achieve the same thing.

I will add this explanation soon.

I don't think this explanation should be printed by rewrk at least in benchmark results. I think explaining how benchmarking process works in rewrk repository (readme) is a better idea.

shujaatak commented 2 years ago

What does Transfer indicate?. Is higher better or lower?

Transfer:
    Total: 264.10 MB Transfer Rate: 26.48 MB/Sec
programatik29 commented 2 years ago

rewrk benchmarks by simply sending as many requests as possible, reading response before sending the next request. All bytes received are displayed in Transfer.

Framework codes are written as simple as possible so some frameworks include extra headers which increase Transfer. This can be ignored in "hello world" benchmark case since it doesn't effect performance much because frameworks are benchmarked in localhost.