Public Repository

Last pushed: 5 months ago
Short Description
Benchmark the web application on container with installed nginx.
Full Description

Run

  • docker run kakakikikeke/nginx-hey-bench

Result

Summary:
  Total:        12.7521 secs
  Slowest:      0.3680 secs
  Fastest:      0.0001 secs
  Average:      0.0063 secs
  Requests/sec: 7841.8525
  Total data:   61200000 bytes
  Size/request: 612 bytes

Status code distribution:
  [200] 100000 responses

Response time histogram:
  0.000 [1]     |
  0.037 [99093] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.074 [672]   |
  0.110 [140]   |
  0.147 [35]    |
  0.184 [17]    |
  0.221 [28]    |
  0.258 [13]    |
  0.294 [0]     |
  0.331 [0]     |
  0.368 [1]     |

Latency distribution:
  10% in 0.0013 secs
  25% in 0.0026 secs
  50% in 0.0043 secs
  75% in 0.0076 secs
  90% in 0.0126 secs
  95% in 0.0160 secs
  99% in 0.0345 secs

Dockerfile

FROM centos:7

# Install go and hey
RUN yum -y update
RUN yum -y install wget git
RUN wget 'https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz'
RUN tar zvxf go1.8.linux-amd64.tar.gz
WORKDIR /usr/local/bin
RUN ln /go/bin/go go
ENV GOROOT /go
ENV GOPATH /root/go
ENV PATH $PATH:$GOPATH/bin
RUN go get -u github.com/rakyll/hey

# Install nginx
RUN rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
RUN yum -y update nginx-release-centos
RUN yum -y --enablerepo=nginx install nginx

# Bench
CMD ["/bin/sh", "-c", "nginx && hey -n 100000 http://localhost"]
Docker Pull Command
Owner
kakakikikeke

Comments (0)