github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/docs/source/benchmark.rst (about)

     1  ==================
     2  Benchmarking Tips
     3  ==================
     4  
     5  We can use boom for benchmarking gohan.
     6  https://github.com/rakyll/boom
     7  
     8  How to install
     9  ---------------
    10  
    11  .. code-block:: shell
    12  
    13    go get github.com/rakyll/boom
    14  
    15  
    16  Sample Server Configuraion
    17  ---------------------------
    18  
    19  .. code-block:: shell
    20  
    21    gohan server --config-file server/server_test_mysql_config.yaml
    22  
    23  
    24  Sample Benchmark
    25  ---------------------------
    26  
    27  Note: this benchmark result get done in my local laptop where benchmark client, server and
    28  database working. We need proper benchmark result in doc in future.
    29  
    30  POST
    31  
    32  .. code-block:: shell
    33  
    34    $ boom -n 1000 -c 100 -m POST -h "X-Auth-Token:admin_token" -d '{"name": "hoge", "tenant_id": "red"}' http://localhost:19090/v2.0/networks/
    35    1000 / 1000 Boooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 %
    36  
    37    Summary:
    38      Total:	1.3190 secs.
    39      Slowest:	0.1941 secs.
    40      Fastest:	0.0104 secs.
    41      Average:	0.1303 secs.
    42      Requests/sec:	758.1509
    43      Total Data Received:	213000 bytes.
    44      Response Size per Request:	213 bytes.
    45  
    46    Status code distribution:
    47      [201]	1000 responses
    48  
    49    Response time histogram:
    50      0.010 [1]	|
    51      0.029 [0]	|
    52      0.047 [0]	|
    53      0.065 [15]	|∎
    54      0.084 [21]	|∎∎
    55      0.102 [70]	|∎∎∎∎∎∎∎∎
    56      0.121 [183]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
    57      0.139 [318]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
    58      0.157 [311]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
    59      0.176 [68]	|∎∎∎∎∎∎∎∎
    60      0.194 [13]	|∎
    61  
    62    Latency distribution:
    63      10% in 0.1007 secs.
    64      25% in 0.1175 secs.
    65      50% in 0.1324 secs.
    66      75% in 0.1447 secs.
    67      90% in 0.1554 secs.
    68      95% in 0.1649 secs.
    69      99% in 0.1766 secs.
    70  
    71  
    72  Get 10 elements in list
    73  
    74  .. code-block:: shell
    75  
    76    $ boom -n 1000 -c 100 -m GET -h "X-Auth-Token:admin_token"  http://localhost:19090/v2.0/networks/?lit=1
    77    1000 / 1000 Boooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 %
    78  
    79    Summary:
    80      Total:	1.3845 secs.
    81      Slowest:	0.2075 secs.
    82      Fastest:	0.0501 secs.
    83      Average:	0.1357 secs.
    84      Requests/sec:	722.3051
    85      Total Data Received:	240000 bytes.
    86      Response Size per Request:	240 bytes.
    87  
    88    Status code distribution:
    89      [200]	1000 responses
    90  
    91    Response time histogram:
    92      0.050 [1]	|
    93      0.066 [11]	|∎
    94      0.082 [34]	|∎∎∎∎
    95      0.097 [63]	|∎∎∎∎∎∎∎∎
    96      0.113 [82]	|∎∎∎∎∎∎∎∎∎∎∎
    97      0.129 [115]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
    98      0.145 [287]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
    99      0.160 [239]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
   100      0.176 [138]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
   101      0.192 [28]	|∎∎∎
   102      0.208 [2]	|
   103  
   104    Latency distribution:
   105      10% in 0.0963 secs.
   106      25% in 0.1224 secs.
   107      50% in 0.1393 secs.
   108      75% in 0.1549 secs.
   109      90% in 0.1649 secs.
   110      95% in 0.1720 secs.
   111      99% in 0.1793 secs.