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: 3b9b0c5020825249a1bffec8bfc518879fb92f5d
4
- data.tar.gz: 597ff341c159cebc2a8af80130536a4de0d5a6c8
3
+ metadata.gz: 9963116cf3fcb09cc1a828c0ec7f42da61e06565
4
+ data.tar.gz: d6c729e2ff896425a3d9b71fe84af67a50913ef9
5
5
  SHA512:
6
- metadata.gz: 1bd4733ec325490de7a0cb8452b4a145fc635e739c7d1b82521ed0422af8d01dc28243fc5cbdeeeca3cf32e2be782d44763027239607da9f7b49fa27577da28d
7
- data.tar.gz: 2517a245a976d566031e411885b7227844cad7551235fb010da34856734cc61bac12f8e34f54ea8d61d75e6e6e940bf9037992fa0b0a4993ebbb3769ca272801
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 name, agent_info, options={}
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
 
@@ -1,3 +1,3 @@
1
1
  module NewRelic::PostgresPlugin
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
@@ -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.9'
16
+ s.version = '0.1.10'
17
17
  s.date = '2014-01-31'
18
18
  s.rubyforge_project = 'newrelic_postgres_plugin'
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_postgres_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hodgson