redis-stat 0.4.7-java → 0.4.8-java

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: 71859f321502403f78b6bc226864dde4c96d76ed
4
- data.tar.gz: 6e218624905da47084ed12cfbcc7992be8de0344
3
+ metadata.gz: 1aa24ce048bd7cd78edfb72b8068bf8a7f35546e
4
+ data.tar.gz: c2ac5054efeaa39188fc5b002f80f4b4eba44ebb
5
5
  SHA512:
6
- metadata.gz: b588717c61e35b3a17c27c3a1049095ca6535bc9ec94eb86129a2cbb4c0ce02ecdbca3c5711eccc2c44885aea2f0695e68b9bff13eb3e7faaf13b5b050802b96
7
- data.tar.gz: 9eca39f203a997aff098df82ba0c6fa3634a718f987ab56119d551664a1836f531e70b4b2033bbd3868f5f5196c5fcf07af9c92bce04ab414980bc738339c496
6
+ metadata.gz: ce240e966b1ca2d6f5c789bcbdbbf84e6f62e1739a256e8eefe052130ac2bf9f4d0a37a784f1dea528291df167045dae0bfd2271cc73d7a69aaa023ab8546448
7
+ data.tar.gz: f8b5c34cf4a15c74e1a49ff1094cd22ef9421aa27d68ef4f564a53127bcb6f57d1ee5e212e962a3c3d0989447f27de3c40577e8513a72cfbd1af0e52301c4133
data/lib/redis-stat.rb CHANGED
@@ -149,6 +149,7 @@ private
149
149
  RedisStat::Server.run!
150
150
  rescue Interrupt
151
151
  end
152
+ Thread.main.raise Interrupt
152
153
  }
153
154
  RedisStat::Server.wait_until_running
154
155
  trap('INT') { Thread.main.raise Interrupt }
@@ -164,6 +164,7 @@ var updateTable = function() {
164
164
  var row = "<tr class='hide'>"
165
165
  for (var i = 0; i < measures.length; ++i) {
166
166
  var m = measures[i]
167
+ if (!jd[m].hasOwnProperty(selected)) return
167
168
  row +=
168
169
  "<td class='" + colors[m] + "'>" +
169
170
  jd[m][selected][0] +
@@ -187,6 +188,13 @@ var updatePlot = function() {
187
188
  if (plot2 != undefined) plot2.destroy();
188
189
  if (plot3 != undefined) plot3.destroy();
189
190
 
191
+ var pluck = function(from) {
192
+ if (from.hasOwnProperty(selected))
193
+ return from[selected][1]
194
+ else
195
+ return 0
196
+ }
197
+
190
198
  // Chart
191
199
  if (hist.length > 0) {
192
200
  var offset = 1 - Math.min(max, hist.length)
@@ -194,25 +202,25 @@ var updatePlot = function() {
194
202
  // Commands/sec
195
203
  plot1 = $.jqplot('chart1', [
196
204
  hist.map(function(h, idx) {
197
- return [idx + offset, h.dynamic['total_commands_processed_per_second'][selected][1] ] })
205
+ return [idx + offset, pluck(h.dynamic['total_commands_processed_per_second']) ] })
198
206
  ], chart_options.chart1);
199
207
  plot1.replot();
200
208
 
201
209
  // CPU usage
202
210
  plot2 = $.jqplot('chart2', [
203
211
  hist.map(function(h, idx) {
204
- return [idx + offset, h.dynamic['used_cpu_user'][selected][1] ] }),
212
+ return [idx + offset, pluck(h.dynamic['used_cpu_user']) ] }),
205
213
  hist.map(function(h, idx) {
206
- return [idx + offset, h.dynamic['used_cpu_sys'][selected][1] ] }),
214
+ return [idx + offset, pluck(h.dynamic['used_cpu_sys']) ] }),
207
215
  ], chart_options.chart2);
208
216
  plot2.replot();
209
217
 
210
218
  // Memory status
211
219
  plot3 = $.jqplot('chart3', [
212
220
  hist.map(function(h, idx) {
213
- return [idx + offset, h.dynamic['used_memory'][selected][1] / 1024 / 1024 ] }),
221
+ return [idx + offset, pluck(h.dynamic['used_memory']) / 1024 / 1024 ] }),
214
222
  hist.map(function(h, idx) {
215
- return [idx + offset, h.dynamic['used_memory_rss'][selected][1] / 1024 / 1024 ] }),
223
+ return [idx + offset, pluck(h.dynamic['used_memory_rss']) / 1024 / 1024 ] }),
216
224
  ], chart_options.chart3);
217
225
  plot3.replot();
218
226
  } else {
@@ -132,15 +132,13 @@
132
132
 
133
133
  </div>
134
134
 
135
+ <a href="https://github.com/junegunn/redis-stat">
136
+ <img style="position: fixed; top: 0; right: 0; border: 0; z-index: 10000" src="/forkme.png" alt="Fork me on GitHub">
137
+ </a>
138
+
135
139
  <footer class="footer">
136
140
  <div class="container">
137
- <p>
138
- Powered by <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>,
139
- <a href="http://jquery.com/">jQuery</a>,
140
- <a href="https://github.com/ivaynberg/select2">select2</a>,
141
- and <a href="http://www.jqplot.com/">jqPlot</a>.
142
- Source code is hosted on <a href="https://github.com/junegunn/redis-stat">GitHub</a>.
143
- </p>
141
+ <p>Powered by <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, <a href="http://jquery.com/">jQuery</a> and <a href="http://www.jqplot.com/">jqPlot</a>.</p>
144
142
  </div>
145
143
  </footer>
146
144
 
@@ -1,3 +1,3 @@
1
1
  class RedisStat
2
- VERSION = '0.4.7'
2
+ VERSION = '0.4.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: java
6
6
  authors:
7
7
  - Junegunn Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi256
@@ -191,6 +191,7 @@ files:
191
191
  - lib/redis-stat/server/public/css/site.css
192
192
  - lib/redis-stat/server/public/favicon.ico
193
193
  - lib/redis-stat/server/public/favicon.png
194
+ - lib/redis-stat/server/public/forkme.png
194
195
  - lib/redis-stat/server/public/jqplot/jqplot.canvasAxisLabelRenderer.min.js
195
196
  - lib/redis-stat/server/public/jqplot/jqplot.canvasAxisTickRenderer.min.js
196
197
  - lib/redis-stat/server/public/jqplot/jqplot.canvasTextRenderer.min.js