redis-stat 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/redis-stat/server/public/js/site.js +18 -10
- data/lib/redis-stat/version.rb +1 -1
- metadata +2 -2
@@ -5,7 +5,8 @@ var history = [],
|
|
5
5
|
colors,
|
6
6
|
info,
|
7
7
|
fade_dur,
|
8
|
-
chart_options
|
8
|
+
chart_options,
|
9
|
+
plot1, plot2, plot3;
|
9
10
|
|
10
11
|
var initialize = function(params) {
|
11
12
|
measures = params.measures
|
@@ -179,34 +180,41 @@ var updateTable = function() {
|
|
179
180
|
}
|
180
181
|
|
181
182
|
var updatePlot = function() {
|
183
|
+
if (plot1 != undefined) plot1.destroy();
|
184
|
+
if (plot2 != undefined) plot2.destroy();
|
185
|
+
if (plot3 != undefined) plot3.destroy();
|
186
|
+
|
182
187
|
// Chart
|
183
188
|
if (history.length > 0) {
|
184
189
|
var offset = 1 - Math.min(max, history.length)
|
185
190
|
|
186
191
|
// Commands/sec
|
187
|
-
$.jqplot('chart1', [
|
192
|
+
plot1 = $.jqplot('chart1', [
|
188
193
|
history.map(function(h, idx) {
|
189
194
|
return [idx + offset, h.dynamic['total_commands_processed_per_second'][1] ] })
|
190
|
-
], chart_options.chart1)
|
195
|
+
], chart_options.chart1);
|
196
|
+
plot1.replot();
|
191
197
|
|
192
198
|
// CPU usage
|
193
|
-
$.jqplot('chart2', [
|
199
|
+
plot2 = $.jqplot('chart2', [
|
194
200
|
history.map(function(h, idx) {
|
195
201
|
return [idx + offset, h.dynamic['used_cpu_user'][1] ] }),
|
196
202
|
history.map(function(h, idx) {
|
197
203
|
return [idx + offset, h.dynamic['used_cpu_sys'][1] ] }),
|
198
|
-
], chart_options.chart2)
|
204
|
+
], chart_options.chart2);
|
205
|
+
plot2.replot();
|
199
206
|
|
200
207
|
// Memory status
|
201
|
-
$.jqplot('chart3', [
|
208
|
+
plot3 = $.jqplot('chart3', [
|
202
209
|
history.map(function(h, idx) {
|
203
210
|
return [idx + offset, h.dynamic['used_memory'][1] / 1024 / 1024 ] }),
|
204
211
|
history.map(function(h, idx) {
|
205
212
|
return [idx + offset, h.dynamic['used_memory_rss'][1] / 1024 / 1024 ] }),
|
206
|
-
], chart_options.chart3)
|
213
|
+
], chart_options.chart3);
|
214
|
+
plot3.replot();
|
207
215
|
} else {
|
208
|
-
$.jqplot('chart1', [[[-1, 0]]], chart_options.chart1)
|
209
|
-
$.jqplot('chart2', [[[-1, 0]]], chart_options.chart2)
|
210
|
-
$.jqplot('chart3', [[[0, 'MEM'], [0, 'RSS']]], chart_options.chart3)
|
216
|
+
plot1 = $.jqplot('chart1', [[[-1, 0]]], chart_options.chart1)
|
217
|
+
plot2 = $.jqplot('chart2', [[[-1, 0]]], chart_options.chart2)
|
218
|
+
plot3 = $.jqplot('chart3', [[[0, 'MEM'], [0, 'RSS']]], chart_options.chart3)
|
211
219
|
}
|
212
220
|
}
|
data/lib/redis-stat/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-stat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ansi
|