puma-status 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/core.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a3510db7ca511e5f6a661691bc2126aa17de54ceedbaa9dc308c2d7e215c6bd
|
4
|
+
data.tar.gz: 1a3e97ac2ac36cf2fdfb1113aa961523e9912be90842dd9e534689e489718536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a63842da6fb0657826c7caba586a018f56983865999e4c9576af6f2d02a965367091450086f27a6e52bfdb07e2409dbd7723be3b384e7899cf3cc714607f63f
|
7
|
+
data.tar.gz: 027417e5cd61121b0b1293caeeee0332d2f269fbc33a386566832963e1e53be1939a42c7815bdf56711210cef466b30bd0bd45c1b3713bc6d3a43107afc0ff4d
|
data/lib/core.rb
CHANGED
@@ -18,9 +18,12 @@ def get_stats(state_file_path)
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def get_top_stats(pids)
|
21
|
-
|
22
|
-
|
23
|
-
.
|
21
|
+
pids.each_slice(19).inject({}) do |res, pids19|
|
22
|
+
top_result = `top -b -n 1 -p #{pids19.join(',')} | tail -n #{pids19.length}`
|
23
|
+
top_result.split("\n").map { |row| r = row.split(' '); [r[0].to_i, r[5].to_i/1024, r[8].to_f] }
|
24
|
+
.inject(res) { |hash, row| hash[row[0]] = { mem: row[1], pcpu: row[2] }; hash }
|
25
|
+
res
|
26
|
+
end
|
24
27
|
end
|
25
28
|
|
26
29
|
def hydrate_stats(stats, puma_state, state_file_path)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoann Lecuyer
|
@@ -93,7 +93,7 @@ files:
|
|
93
93
|
- lib/helpers.rb
|
94
94
|
- lib/puma-status.rb
|
95
95
|
- lib/stats.rb
|
96
|
-
homepage:
|
96
|
+
homepage: https://github.com/ylecuyer/puma-status
|
97
97
|
licenses:
|
98
98
|
- MIT
|
99
99
|
metadata: {}
|
@@ -116,5 +116,5 @@ rubyforge_project:
|
|
116
116
|
rubygems_version: 2.7.6.2
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
|
-
summary:
|
119
|
+
summary: Command-line too for puma to display information about running request/process
|
120
120
|
test_files: []
|