Skip to content

Instantly share code, notes, and snippets.

@nyku
Last active March 7, 2017 22:56
Show Gist options
  • Save nyku/c4858ed0ef43322256b594f9e0000fc2 to your computer and use it in GitHub Desktop.
Save nyku/c4858ed0ef43322256b594f9e0000fc2 to your computer and use it in GitHub Desktop.
Kemal vs phoenix [NO database interaction]
➜ work sh siege.sh
-------------------------------ELIXIR--------------------------------
** SIEGE 3.0.5
** Preparing 600 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 66070 hits
Availability: 100.00 %
Elapsed time: 9.82 secs
Data transferred: 0.63 MB
Response time: 0.09 secs
Transaction rate: 6728.11 trans/sec
Throughput: 0.06 MB/sec
Concurrency: 591.85
Successful transactions: 66070
Failed transactions: 0
Longest transaction: 1.13
Shortest transaction: 0.01
FILE: /var/log/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.
[error] Unable to write to file: Permission denied
-------------------------------KEMAL--------------------------------
** SIEGE 3.0.5
** Preparing 600 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 134395 hits
Availability: 100.00 %
Elapsed time: 9.95 secs
Data transferred: 1.03 MB
Response time: 0.04 secs
Transaction rate: 13507.04 trans/sec
Throughput: 0.10 MB/sec
Concurrency: 563.65
Successful transactions: 134395
Failed transactions: 0
Longest transaction: 7.26
Shortest transaction: 0.00
FILE: /var/log/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.
[error] Unable to write to file: Permission denied
-------------------------------END--------------------------------
@nyku
Copy link
Author

nyku commented Mar 7, 2017

# Entire Kemal App:
require "kemal"
require "json"

get "/api" do |env|
  env.response.content_type = "application/json"
  {test: "yes"}.to_json
end

Kemal.run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment