pghero 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pghero might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfc35959d2a721f371bbc7f28c7e415485a268c9
4
- data.tar.gz: 788408cad05a467b557df63bfb1e8891c2842929
3
+ metadata.gz: 72c9e058b5ed49715e3376e81828ab8e16f37cf9
4
+ data.tar.gz: 0371e228982aa29fc28780d81c41a7669f84e5f0
5
5
  SHA512:
6
- metadata.gz: 7246d02545036c314c9191870b48e26698a8eb73bba6ca01fd28a0f98a4110aac2777d1695d1fa4d7870e6101b769b195e6ece9a363828c3d02c36e4716fe7fd
7
- data.tar.gz: 7ed33909351e100883ec0b5c6c7fa05100d78cdd7c8b0277ecd8c723bd353482d5146f3cd99fc3a1d2f7ef746a503a69300ced87a266118da5611894bec19012
6
+ metadata.gz: fc8ba7e762a1cd496a704096983022024d27bd15169e963c4c2b24263c3e35f3014536aa285d32163f83e5c2482d8adefd2193c9fd495b0b3f1ae10831825b22
7
+ data.tar.gz: 3c7580581995c32e229d259b8e2f50b29a12fb15f34ccf8895e690344cd8f708a0efe4675e086bcd451803418efdc4788f7d1667c87947f57c97a92c9c83c9ff
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [View the demo](https://pghero.herokuapp.com/)
6
6
 
7
- ![Screenshot](https://pghero.herokuapp.com/assets/screenshot-691982ac8e93cdaf6d386e318e971dd5.png)
7
+ ![Screenshot](https://pghero.herokuapp.com/assets/screenshot-720ebfd2af9031f0565e4cc84cae99c0.png)
8
8
 
9
9
  Supports PostgreSQL 9.2+
10
10
 
@@ -68,9 +68,8 @@ end
68
68
 
69
69
  ## TODO
70
70
 
71
- - demo
72
71
  - better explanations on dashboard
73
- - more space metrics
72
+ - use `pg_stat_statements` extension for more detailed insights
74
73
  - poll for running queries
75
74
  - better design (no bootstrap)
76
75
 
@@ -15,14 +15,14 @@
15
15
  </div>
16
16
  <div class="alert alert-<%= @missing_indexes.empty? ? "success" : "warning" %>">
17
17
  <% if @missing_indexes.any? %>
18
- <%= pluralize(@missing_indexes.size, "possibly missing index") %>
18
+ <%= pluralize(@missing_indexes.size, "possibly missing index", "possibly missing indexes") %>
19
19
  <% else %>
20
20
  No missing indexes
21
21
  <% end %>
22
22
  </div>
23
23
  <div class="alert alert-<%= @unused_indexes.empty? ? "success" : "warning" %>">
24
24
  <% if @unused_indexes.any? %>
25
- <%= pluralize(@unused_indexes.size, "unused index") %>
25
+ <%= pluralize(@unused_indexes.size, "unused index", "unused indexes") %>
26
26
  <% else %>
27
27
  No unused indexes
28
28
  <% end %>
@@ -68,7 +68,7 @@
68
68
  <tr>
69
69
  <td><%= query["table"] %></td>
70
70
  <td style="width: 30%;"><%= query["percent_of_times_index_used"] %></td>
71
- <td style="width: 20%;"><%= query["rows_in_table"] %></td>
71
+ <td style="width: 20%;"><%= number_with_delimiter(query["rows_in_table"]) %></td>
72
72
  </tr>
73
73
  <% end %>
74
74
  </tbody>
@@ -100,7 +100,7 @@ module PgHero
100
100
  pg_stat_user_tables
101
101
  WHERE
102
102
  idx_scan > 0
103
- AND idx_scan < 95
103
+ AND (100 * idx_scan / (seq_scan + idx_scan)) < 95
104
104
  AND n_live_tup >= 10000
105
105
  ORDER BY
106
106
  n_live_tup DESC,
@@ -1,3 +1,3 @@
1
1
  module PgHero
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pghero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane