newrelic_postgres_plugin 0.2.2 → 0.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df49884a5a752bb2515da8bacbaa3d2e5c946483
|
4
|
+
data.tar.gz: aadb0a56547d98b2a940c545a563744e334420c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd61c6982580ef02ffaa5609377849c7a33df7751dd230a7fd44f315323f4ea7dfd70cb44d91364218fa60e38443fd1dd3027c6bfc355d2929436ae605cc2b6
|
7
|
+
data.tar.gz: 1dd6eed77a06076bc83c03b3c918a2fd6370750039635d921d07d7377221a04a95bc8f43d8e953af346c9055aa5f2c39df2c845198c35a0a6527e5b61c06ad3e
|
@@ -61,6 +61,7 @@ module NewRelic::PostgresPlugin
|
|
61
61
|
report_database_metrics
|
62
62
|
report_index_metrics
|
63
63
|
report_cache_metrics
|
64
|
+
report_qps_metrics
|
64
65
|
|
65
66
|
rescue => e
|
66
67
|
$stderr.puts "#{e}: #{e.backtrace.join("\n ")}"
|
@@ -121,6 +122,10 @@ module NewRelic::PostgresPlugin
|
|
121
122
|
report_metric "Cache/Miss Ratio", '%', calculate_miss_ratio(%Q{SELECT SUM(heap_blks_hit) AS hits, SUM(heap_blks_read) AS reads FROM pg_statio_user_tables})
|
122
123
|
end
|
123
124
|
|
125
|
+
def report_qps_metrics
|
126
|
+
report_derived_metric "Database/Queries/Count", '', @connection.exec("SELECT SUM(calls) FROM pg_stat_statements")[0]["sum"].to_i
|
127
|
+
end
|
128
|
+
|
124
129
|
private
|
125
130
|
|
126
131
|
# This assumes the query returns a single row with two columns: hits and reads.
|
@@ -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.2.
|
16
|
+
s.version = '0.2.3'
|
17
17
|
s.date = '2014-08-05'
|
18
18
|
s.rubyforge_project = 'newrelic_postgres_plugin'
|
19
19
|
|