puma-status 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/core.rb +6 -6
- data/lib/helpers.rb +2 -2
- data/lib/puma-status.rb +6 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edca43a85e295ab116159f64a2f938f08ca8bb228d3c9a1858e3e6b1c2af42d5
|
4
|
+
data.tar.gz: ed4e67eef12e37bc463573ab8e1b2e2f7d7b04654e23615ff68461822e2af74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ac75cb6ba28f5e69856fc93144cd0cd06543281da12654ea15d95e1281b571e6c4caf9d81f466cdd48b21819f4e47f6d205ccffc95130c1a17a55d58ae46f15
|
7
|
+
data.tar.gz: 1ab7b9ee34dd4674bea3398f6d4c69431e4c64cac105d4651bf0f0dcad113223727be6984373b1ee7f8a678c4b91db36ba3f7d117696aac57e39b433582d4cf6
|
data/lib/core.rb
CHANGED
@@ -82,7 +82,7 @@ def format_stats(stats)
|
|
82
82
|
master_line += " | Phase: #{stats.phase}" if stats.phase
|
83
83
|
|
84
84
|
if stats.booting?
|
85
|
-
master_line += " #{
|
85
|
+
master_line += " #{yellow("booting")}"
|
86
86
|
else
|
87
87
|
master_line += " | Load: #{color(75, 50, stats.load, asciiThreadLoad(stats.running_threads, stats.spawned_threads, stats.max_threads))}"
|
88
88
|
master_line += " | Req: #{stats.requests_count}" if stats.requests_count
|
@@ -92,15 +92,15 @@ def format_stats(stats)
|
|
92
92
|
worker_line = " └ #{wstats.pid.to_s.rjust(5, ' ')} CPU: #{color(75, 50, wstats.pcpu, wstats.pcpu.to_s.rjust(5, ' '))}% Mem: #{color(1000, 750, wstats.mem, wstats.mem.to_s.rjust(4, ' '))} MB Uptime: #{seconds_to_human(wstats.uptime)}"
|
93
93
|
|
94
94
|
if wstats.booting?
|
95
|
-
worker_line += " #{
|
95
|
+
worker_line += " #{yellow("booting")}"
|
96
96
|
elsif wstats.killed?
|
97
|
-
worker_line += " #{
|
97
|
+
worker_line += " #{red("killed")}"
|
98
98
|
else
|
99
99
|
worker_line += " | Load: #{color(75, 50, wstats.load, asciiThreadLoad(wstats.running_threads, wstats.spawned_threads, wstats.max_threads))}"
|
100
|
-
worker_line += " | Phase: #{
|
100
|
+
worker_line += " | Phase: #{red(wstats.phase)}" if wstats.phase != stats.phase
|
101
101
|
worker_line += " | Req: #{wstats.requests_count}" if wstats.requests_count
|
102
|
-
worker_line += " Queue: #{
|
103
|
-
worker_line += " Last checkin: #{
|
102
|
+
worker_line += " Queue: #{red(wstats.backlog.to_s)}" if wstats.backlog > 0
|
103
|
+
worker_line += " Last checkin: #{red(wstats.last_checkin)}" if wstats.last_checkin >= 10
|
104
104
|
end
|
105
105
|
|
106
106
|
worker_line
|
data/lib/helpers.rb
CHANGED
data/lib/puma-status.rb
CHANGED
@@ -19,22 +19,22 @@ def run
|
|
19
19
|
format_stats(get_stats(state_file_path))
|
20
20
|
rescue Errno::ENOENT => e
|
21
21
|
if e.message =~ /#{state_file_path}/
|
22
|
-
errors << "#{
|
22
|
+
errors << "#{yellow(state_file_path)} doesn't exists"
|
23
23
|
elsif e.message =~ /connect\(2\) for [^\/]/
|
24
|
-
errors << "#{
|
24
|
+
errors << "#{yellow("Relative Unix socket")}: the Unix socket of the control app has a relative path. Please, ensure you are running from the same folder has puma."
|
25
25
|
else
|
26
|
-
errors << "#{
|
26
|
+
errors << "#{red(state_file_path)} an unhandled error occured: #{e.inspect}"
|
27
27
|
end
|
28
28
|
nil
|
29
29
|
rescue Errno::EISDIR => e
|
30
30
|
if e.message =~ /#{state_file_path}/
|
31
|
-
errors << "#{
|
31
|
+
errors << "#{yellow(state_file_path)} isn't a state file"
|
32
32
|
else
|
33
|
-
errors << "#{
|
33
|
+
errors << "#{red(state_file_path)} an unhandled error occured: #{e.inspect}"
|
34
34
|
end
|
35
35
|
nil
|
36
36
|
rescue => e
|
37
|
-
errors << "#{
|
37
|
+
errors << "#{red(state_file_path)} an unhandled error occured: #{e.inspect}"
|
38
38
|
nil
|
39
39
|
end
|
40
40
|
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoann Lecuyer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-07-14 00:00:00.000000000 Z
|
@@ -94,8 +94,8 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.9'
|
97
|
-
description:
|
98
|
-
email:
|
97
|
+
description:
|
98
|
+
email:
|
99
99
|
executables:
|
100
100
|
- puma-status
|
101
101
|
extensions: []
|
@@ -111,7 +111,7 @@ homepage: https://github.com/ylecuyer/puma-status
|
|
111
111
|
licenses:
|
112
112
|
- MIT
|
113
113
|
metadata: {}
|
114
|
-
post_install_message:
|
114
|
+
post_install_message:
|
115
115
|
rdoc_options: []
|
116
116
|
require_paths:
|
117
117
|
- lib
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubygems_version: 3.4.0.dev
|
130
|
-
signing_key:
|
130
|
+
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Command-line tool for puma to display information about running request/process
|
133
133
|
test_files: []
|