Skip to content

Commit 233fc49

Browse files
committed
Review suugestions from @schneems
1 parent 139b1e7 commit 233fc49

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

docs/stats.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ When Puma runs in single mode, these stats are available at the top level. When
6565
and is not used for any internal decisions, unlike `busy_theads`, which is usually a more useful stat.
6666
* max_threads: the maximum number of threads Puma is configured to spool per worker
6767
* requests_count: the number of requests this worker has served since starting
68-
68+
* reactor_max: the maximum observed number of requests held in Puma's "reactor" which is used for asyncronously buffering request bodies. This stat is reset on every call, so it's the maximum value observed since the last stat call.
69+
* backlog_max: the maximum number of requests that have been fully buffered by the reactor and placed in a ready queue, but have not yet been picked up by a server thread. This stat is reset on every call, so it's the maximum value observed since the last stat call.
6970

7071
### cluster mode
7172

lib/puma/cluster/worker_handle.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def ping!(status)
6060
# @todo remove each once Ruby 2.5 is no longer supported
6161
status.tr('}{"', '').strip.split(", ").each do |kv|
6262
cntr = 0
63-
ary = kv.split(':').each do |t|
63+
kv.split(':').each do |t|
6464
if cntr == 0
6565
k = t
6666
cntr = 1

lib/puma/dsl.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,7 @@ def fork_worker(after_requests=1000)
12731273
# @deprecated Use {#max_keep_alive} instead.
12741274
#
12751275
def max_fast_inline(num_of_requests)
1276+
warn "[WARNING] `max_fast_inline` is deprecated use `max_keep_alive` instead"
12761277
@options[:max_keep_alive] ||= Float(num_of_requests) unless num_of_requests.nil?
12771278
end
12781279

test/test_puma_server.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ def test_puma_socket
290290
assert_equal body, data
291291
end
292292

293-
294-
295-
296293
def test_very_large_return
297294
giant = "x" * 2056610
298295

@@ -1416,13 +1413,10 @@ def test_chunked_keep_alive_two_back_to_back
14161413
def test_chunked_keep_alive_twenty_back_to_back
14171414
req_count = 20
14181415
requests = 0
1419-
body = nil
1420-
content_length = nil
14211416

14221417
server_run(max_fast_inline: 21) { |env|
14231418
requests += 1
1424-
body = env['rack.input'].read
1425-
content_length = env['CONTENT_LENGTH']
1419+
env['rack.input'].read
14261420
[200, {}, ["Request_#{requests}"]]
14271421
}
14281422

0 commit comments

Comments
 (0)