newrelic_postgres_plugin 0.1.9 → 0.1.10
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9963116cf3fcb09cc1a828c0ec7f42da61e06565
|
4
|
+
data.tar.gz: d6c729e2ff896425a3d9b71fe84af67a50913ef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d5fe44288f1606c4d26b06aa8ee4d46bde9f5643d28f80e9b67a2fb454e18ff38c9e8e9b070e8c3b7e64aa33a96a06d5632fb781e42f8b1680bff803fd712c
|
7
|
+
data.tar.gz: 39f0650e1cca644fef715560493a6d8d1e82ceded511c521cf04867426b685dd6e0e4be9fa31a47c6128590e60de10098bed580f886febe4b6d96e2ad73a5a67
|
@@ -17,7 +17,7 @@ module NewRelic::PostgresPlugin
|
|
17
17
|
agent_config_options :host, :port, :user, :password, :dbname, :sslmode, :label
|
18
18
|
agent_human_labels('Postgres') { "#{label || host}" }
|
19
19
|
|
20
|
-
def initialize
|
20
|
+
def initialize(*args)
|
21
21
|
@previous_metrics = {}
|
22
22
|
super
|
23
23
|
end
|
@@ -165,11 +165,13 @@ module NewRelic::PostgresPlugin
|
|
165
165
|
'index hit rate' AS name,
|
166
166
|
(sum(idx_blks_hit)) / sum(idx_blks_hit + idx_blks_read) AS ratio
|
167
167
|
FROM pg_statio_user_indexes
|
168
|
+
WHERE idx_blks_hit > 0
|
168
169
|
UNION ALL
|
169
170
|
SELECT
|
170
171
|
'cache hit rate' AS name,
|
171
172
|
sum(heap_blks_hit) / (sum(heap_blks_hit) + sum(heap_blks_read)) AS ratio
|
172
|
-
FROM pg_statio_user_tables
|
173
|
+
FROM pg_statio_user_tables
|
174
|
+
WHERE idx_blks_hit > 0;
|
173
175
|
)
|
174
176
|
end
|
175
177
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'newrelic_postgres_plugin'
|
16
|
-
s.version = '0.1.
|
16
|
+
s.version = '0.1.10'
|
17
17
|
s.date = '2014-01-31'
|
18
18
|
s.rubyforge_project = 'newrelic_postgres_plugin'
|
19
19
|
|