redis-stat 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7a0c20ab6880f7ba67922530fbc87374d38c7ea
4
- data.tar.gz: 26161083c1511666878e0441eda4c0a82024d1c4
3
+ metadata.gz: 30d9a13b1fb84a716edfdfb8d6b531dec468f823
4
+ data.tar.gz: bf10d40aba6f7c8d944b2a87877840c6c6321d6f
5
5
  SHA512:
6
- metadata.gz: 98d0cbbafb56922ddc4d19591616b68f2e253313136b1dbd2bc45273c3e498b1fc346268c015e0431f0c8c95de02e0c65765fd88d4261e49873cb416c2d911eb
7
- data.tar.gz: 5ca2b2332925a5ac2c85111696ec53125476836b04913c86c9d2c8aedab82fcfd17c5e2b92784ab12704ab66a5bde3de1168297792d861636e53d3a730bf5c54
6
+ metadata.gz: de97452107da1449a8fc1e42ce28bbc87ce22d00baac4ba9da476c319ddee3ea2095b6c4236acfe54c8e3c3d03f34bbc54c197504b6f463cdc025689cf959c35
7
+ data.tar.gz: a168cf85734968db5c9314bcd1544eca454ca652a113a63fdca1e3e78e5adaf713aadf9ad3af85548a166d17b5ad1543b9171b3000bcf2ffc3fa50a15c70f4ae
data/README.md CHANGED
@@ -26,7 +26,7 @@ usage: redis-stat [HOST[:PORT] ...] [INTERVAL [COUNT]]
26
26
  --style=STYLE Output style: unicode|ascii
27
27
  --no-color Suppress ANSI color codes
28
28
  --csv=OUTPUT_CSV_FILE_PATH Save the result in CSV format
29
- --es=ELASTICSEARCH_URL Send results to Elasticsearch
29
+ --es=ELASTICSEARCH_URL Send results to ElasticSearch: [http://]HOST[:PORT][/INDEX]
30
30
 
31
31
  --server[=PORT] Launch redis-stat web server (default port: 63790)
32
32
  --daemon Daemonize redis-stat. Must be used with --server option.
@@ -86,6 +86,7 @@ printed as they are not supported in the default Windows command prompt.
86
86
  ## Contributors
87
87
  - [Chris Meisl](https://github.com/cmeisl)
88
88
  - [Hyunseok Hwang](https://github.com/frhwang)
89
+ - [Sent Hil](https://github.com/sent-hil)
89
90
 
90
91
  ## Contributing
91
92
 
@@ -38,7 +38,7 @@ module Option
38
38
  options[:csv] = v
39
39
  end
40
40
 
41
- opts.on('--es=ELASTICSEARCH_URL', 'Send results to Elasticsearch') do |v|
41
+ opts.on('--es=ELASTICSEARCH_URL', 'Send results to ElasticSearch: [http://]HOST[:PORT][/INDEX]') do |v|
42
42
  options[:es] = RedisStat::ElasticsearchSink.parse_url v
43
43
  end
44
44
 
@@ -1,4 +1,4 @@
1
- var history = [],
1
+ var hist = [],
2
2
  max,
3
3
  rows,
4
4
  measures,
@@ -134,9 +134,9 @@ var initialize = function(params) {
134
134
  }
135
135
 
136
136
  var appendToHistory = function(json) {
137
- if (history.length == 0 || json.at > history[ history.length - 1 ].at) {
138
- history.push(json)
139
- if (history.length > max) history.shift()
137
+ if (hist.length == 0 || json.at > hist[ hist.length - 1 ].at) {
138
+ hist.push(json)
139
+ if (hist.length > max) hist.shift()
140
140
  return true
141
141
  } else {
142
142
  return false
@@ -144,7 +144,7 @@ var appendToHistory = function(json) {
144
144
  }
145
145
 
146
146
  var updateTable = function() {
147
- var json = history[ history.length - 1 ],
147
+ var json = hist[ hist.length - 1 ],
148
148
  js = json.static,
149
149
  jd = json.dynamic
150
150
 
@@ -185,30 +185,30 @@ var updatePlot = function() {
185
185
  if (plot3 != undefined) plot3.destroy();
186
186
 
187
187
  // Chart
188
- if (history.length > 0) {
189
- var offset = 1 - Math.min(max, history.length)
188
+ if (hist.length > 0) {
189
+ var offset = 1 - Math.min(max, hist.length)
190
190
 
191
191
  // Commands/sec
192
192
  plot1 = $.jqplot('chart1', [
193
- history.map(function(h, idx) {
193
+ hist.map(function(h, idx) {
194
194
  return [idx + offset, h.dynamic['total_commands_processed_per_second'][1] ] })
195
195
  ], chart_options.chart1);
196
196
  plot1.replot();
197
197
 
198
198
  // CPU usage
199
199
  plot2 = $.jqplot('chart2', [
200
- history.map(function(h, idx) {
200
+ hist.map(function(h, idx) {
201
201
  return [idx + offset, h.dynamic['used_cpu_user'][1] ] }),
202
- history.map(function(h, idx) {
202
+ hist.map(function(h, idx) {
203
203
  return [idx + offset, h.dynamic['used_cpu_sys'][1] ] }),
204
204
  ], chart_options.chart2);
205
205
  plot2.replot();
206
206
 
207
207
  // Memory status
208
208
  plot3 = $.jqplot('chart3', [
209
- history.map(function(h, idx) {
209
+ hist.map(function(h, idx) {
210
210
  return [idx + offset, h.dynamic['used_memory'][1] / 1024 / 1024 ] }),
211
- history.map(function(h, idx) {
211
+ hist.map(function(h, idx) {
212
212
  return [idx + offset, h.dynamic['used_memory_rss'][1] / 1024 / 1024 ] }),
213
213
  ], chart_options.chart3);
214
214
  plot3.replot();
@@ -1,3 +1,3 @@
1
1
  class RedisStat
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
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.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junegunn Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-14 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi256