prometheus_exporter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ab5d3f6ca1ef701116fda3e93cd10f27f2b6dec09d9c51e85a5cfb630680cb8
4
- data.tar.gz: a743e9b6aa2b30d5cf815126bc75093a6ea99128b2837b7ab0008c732fb89a03
3
+ metadata.gz: 6d3374059942d70d2bbebe1de9cb3769dc8ff562bef3c4c79aff97023d2a1b45
4
+ data.tar.gz: 9903e75d79d6f92b014835e99793dd8979d464acef9ff1d82b91c0fe056ec1a7
5
5
  SHA512:
6
- metadata.gz: 40d8f8b98148df693fdc543a3f2a48893f3a101ecc30a9fddeae68a42c1aeb7a31c1848879e5226aae6e81662be4e1d83b1ed34d3e4a69f16ade8b5465e66957
7
- data.tar.gz: 18960e4fefd02b61cbfd8188c8fd47fcb9e20c606e4adedf838e68e09a0446d5187583978a06edf6e2cc1668f4da9e80a01a6b399202f95bd007cfd3dc7b20e7
6
+ metadata.gz: c93a68aaf72d3ece28914b93c097ad3659397a5cd147d6917cd9c9cc72cea2f939e836b696f24dd30963c1deed0234a4e088a8cdfdb62df50f0a768c06e8cb4a
7
+ data.tar.gz: f88f72c5ed0d34f26deeac798ea3d5397379d3e6f4ffdf2205f5b7cf1f44a84a346c07ed4bfb059a12ca3a92fcc96c3b816b63c090b949f1ec203e97615008f8
@@ -109,7 +109,8 @@ module PrometheusExporter::Server
109
109
 
110
110
  def get_rss
111
111
  @pagesize ||= `getconf PAGESIZE`.to_i rescue 4096
112
- File.read("/proc/#{pid}/statm").split(' ')[1].to_i * @pagesize rescue 0
112
+ @pid ||= Process.pid
113
+ File.read("/proc/#{@pid}/statm").split(' ')[1].to_i * @pagesize rescue 0
113
114
  end
114
115
 
115
116
  def add_gauge(name, help, value)
@@ -1,3 +1,3 @@
1
1
  module PrometheusExporter
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron