For a 100 requests.
$ ruby ~/s/bench_connection_pool.rb
user system total real
without 1.329350 0.059367 1.388717 ( 7.018174)
with 0.222370 0.000000 0.222370 ( 1.659621)
| # Configuration for Alacritty, the GPU enhanced terminal emulator. | |
| # Any items in the `env` entry below will be added as | |
| # environment variables. Some entries may override variables | |
| # set by alacritty itself. | |
| env: | |
| TERM: xterm-256color | |
| # # TERM variable | |
| # # | |
| # # This value is used to set the `$TERM` environment variable for |
| // ==UserScript== | |
| // @name remove the video controls from netflix | |
| // @version 1 | |
| // @grant GM_addStyle | |
| // ==/UserScript== | |
| function addGlobalStyle(css) { | |
| var head, style; | |
| head = document.getElementsByTagName('head')[0]; | |
| if (!head) { return; } |
| --silent | |
| --write-out "@/home/minhajuddin/r/dot3/curl-meta-fmt" |
| defmodule Player do | |
| def start(p1, p2) do | |
| # start their game p1 sends a ping to p2 | |
| send(p2, {:ping, p1}) | |
| end | |
| def play do | |
| receive do | |
| {input_message, _from = opponent_pid} -> | |
| respond(opponent_pid, input_message) |
| # This is the target module which will be overwritten after dynamic compilation | |
| # You'll be using this to read configuration in your code. For instance, if you | |
| # have a configuration key called `:redis_timeout`, you could read it using | |
| # `MM.Config.get(:redis_timeout)` | |
| defmodule MM.Config do | |
| # we use a default implementation which raises an error when our code tries | |
| # to read configuration before it is compiled. | |
| def get(_key), do: raise("Config has not been compiled yet!") | |
| end |
| defmodule SearchWorker do | |
| use GenServer | |
| @idle_timeout_ms 10 * 60 * 1000 | |
| # client api | |
| def touch(pid) do | |
| GenServer.cast(pid, :touch) | |
| end |
| defmodule SearchWorker do | |
| use GenServer | |
| @idle_timeout_ms 10 * 60 * 1000 | |
| # client api | |
| def touch(pid) do | |
| GenServer.cast(pid, :touch) | |
| end |
| defmodule SearchWorker do | |
| use GenServer | |
| @idle_timeout_ms 10 * 60 * 1000 | |
| @impl GenServer | |
| def init(state) do | |
| # send ourselves a message after 10 seconds and cleanup the proc tree when we get this | |
| Process.send_after(self(), :idle_timeout, @idle_timeout_ms) | |
| {:ok, state} |
| defmodule SearchWorker do | |
| use GenServer | |
| @idle_timeout_ms 10 * 60 * 1000 | |
| @impl GenServer | |
| def init(state) do | |
| # send ourselves a message after 10 seconds and cleanup the proc tree when we get this | |
| Process.send_after(self(), :idle_timeout, @idle_timeout_ms) | |
| {:ok, state} |