io_shuten 0.0.3.dev1 → 0.1.0.dev6

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,258 +1,258 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: io_shuten
3
- version: !ruby/object:Gem::Version
4
- hash: 1717600579
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.dev6
5
5
  prerelease: 6
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- - dev
11
- - 1
12
- version: 0.0.3.dev1
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Christoph Grabo
16
9
  autorequire:
17
10
  bindir: bin
18
11
  cert_chain: []
19
-
20
- date: 2012-01-25 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2012-01-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: iobuffer
16
+ requirement: &7717180 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 23
29
- segments:
30
- - 1
31
- - 0
32
- - 0
20
+ - !ruby/object:Gem::Version
33
21
  version: 1.0.0
34
- version_requirements: *id001
35
- name: iobuffer
36
- prerelease: false
37
22
  type: :runtime
38
- - !ruby/object:Gem::Dependency
39
- requirement: &id002 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ version_requirements: *7717180
25
+ - !ruby/object:Gem::Dependency
26
+ name: hiredis
27
+ requirement: &7714860 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
29
+ requirements:
42
30
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 7
45
- segments:
46
- - 0
47
- - 4
48
- - 4
31
+ - !ruby/object:Gem::Version
49
32
  version: 0.4.4
50
- version_requirements: *id002
51
- name: hiredis
52
- prerelease: false
53
33
  type: :runtime
54
- - !ruby/object:Gem::Dependency
55
- requirement: &id003 !ruby/object:Gem::Requirement
34
+ prerelease: false
35
+ version_requirements: *7714860
36
+ - !ruby/object:Gem::Dependency
37
+ name: redis
38
+ requirement: &7713120 !ruby/object:Gem::Requirement
56
39
  none: false
57
- requirements:
40
+ requirements:
58
41
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 2
63
- - 2
64
- - 2
42
+ - !ruby/object:Gem::Version
65
43
  version: 2.2.2
66
- version_requirements: *id003
67
- name: redis
44
+ type: :runtime
68
45
  prerelease: false
46
+ version_requirements: *7713120
47
+ - !ruby/object:Gem::Dependency
48
+ name: redis-namespace
49
+ requirement: &7728400 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
69
55
  type: :runtime
70
- - !ruby/object:Gem::Dependency
71
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ prerelease: false
57
+ version_requirements: *7728400
58
+ - !ruby/object:Gem::Dependency
59
+ name: bson_ext
60
+ requirement: &7727560 !ruby/object:Gem::Requirement
72
61
  none: false
73
- requirements:
62
+ requirements:
74
63
  - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 7
77
- segments:
78
- - 1
79
- - 5
80
- - 2
64
+ - !ruby/object:Gem::Version
81
65
  version: 1.5.2
82
- version_requirements: *id004
83
- name: bson_ext
84
- prerelease: false
85
66
  type: :runtime
86
- - !ruby/object:Gem::Dependency
87
- requirement: &id005 !ruby/object:Gem::Requirement
67
+ prerelease: false
68
+ version_requirements: *7727560
69
+ - !ruby/object:Gem::Dependency
70
+ name: mongo
71
+ requirement: &7726400 !ruby/object:Gem::Requirement
88
72
  none: false
89
- requirements:
73
+ requirements:
90
74
  - - ~>
91
- - !ruby/object:Gem::Version
92
- hash: 7
93
- segments:
94
- - 1
95
- - 5
96
- - 2
75
+ - !ruby/object:Gem::Version
97
76
  version: 1.5.2
98
- version_requirements: *id005
99
- name: mongo
77
+ type: :runtime
100
78
  prerelease: false
79
+ version_requirements: *7726400
80
+ - !ruby/object:Gem::Dependency
81
+ name: ffi
82
+ requirement: &7725120 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
101
88
  type: :runtime
102
- - !ruby/object:Gem::Dependency
103
- requirement: &id006 !ruby/object:Gem::Requirement
89
+ prerelease: false
90
+ version_requirements: *7725120
91
+ - !ruby/object:Gem::Dependency
92
+ name: ffi-rzmq
93
+ requirement: &7724060 !ruby/object:Gem::Requirement
104
94
  none: false
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
- version: "0"
112
- version_requirements: *id006
113
- name: rake
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :runtime
114
100
  prerelease: false
115
- type: :development
116
- - !ruby/object:Gem::Dependency
117
- requirement: &id007 !ruby/object:Gem::Requirement
101
+ version_requirements: *7724060
102
+ - !ruby/object:Gem::Dependency
103
+ name: rake
104
+ requirement: &7737240 !ruby/object:Gem::Requirement
118
105
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
124
- - 0
125
- version: "0"
126
- version_requirements: *id007
127
- name: jeweler
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
128
111
  prerelease: false
112
+ version_requirements: *7737240
113
+ - !ruby/object:Gem::Dependency
114
+ name: jeweler
115
+ requirement: &7733580 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
129
121
  type: :development
130
- - !ruby/object:Gem::Dependency
131
- requirement: &id008 !ruby/object:Gem::Requirement
122
+ prerelease: false
123
+ version_requirements: *7733580
124
+ - !ruby/object:Gem::Dependency
125
+ name: rspec
126
+ requirement: &7729600 !ruby/object:Gem::Requirement
132
127
  none: false
133
- requirements:
128
+ requirements:
134
129
  - - ~>
135
- - !ruby/object:Gem::Version
136
- hash: 47
137
- segments:
138
- - 2
139
- - 8
140
- - 0
130
+ - !ruby/object:Gem::Version
141
131
  version: 2.8.0
142
- version_requirements: *id008
143
- name: rspec
144
- prerelease: false
145
132
  type: :development
146
- - !ruby/object:Gem::Dependency
147
- requirement: &id009 !ruby/object:Gem::Requirement
148
- none: false
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- hash: 3
153
- segments:
154
- - 0
155
- version: "0"
156
- version_requirements: *id009
157
- name: simplecov
158
133
  prerelease: false
159
- type: :development
160
- - !ruby/object:Gem::Dependency
161
- requirement: &id010 !ruby/object:Gem::Requirement
134
+ version_requirements: *7729600
135
+ - !ruby/object:Gem::Dependency
136
+ name: simplecov
137
+ requirement: &7742140 !ruby/object:Gem::Requirement
162
138
  none: false
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- hash: 3
167
- segments:
168
- - 0
169
- version: "0"
170
- version_requirements: *id010
171
- name: simplecov-rcov
172
- prerelease: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
173
143
  type: :development
174
- - !ruby/object:Gem::Dependency
175
- requirement: &id011 !ruby/object:Gem::Requirement
176
- none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 3
181
- segments:
182
- - 0
183
- version: "0"
184
- version_requirements: *id011
185
- name: simplecov-csv
186
144
  prerelease: false
187
- type: :development
188
- - !ruby/object:Gem::Dependency
189
- requirement: &id012 !ruby/object:Gem::Requirement
145
+ version_requirements: *7742140
146
+ - !ruby/object:Gem::Dependency
147
+ name: simplecov-rcov
148
+ requirement: &7740620 !ruby/object:Gem::Requirement
190
149
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- hash: 3
195
- segments:
196
- - 0
197
- version: "0"
198
- version_requirements: *id012
199
- name: redcarpet
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :development
200
155
  prerelease: false
156
+ version_requirements: *7740620
157
+ - !ruby/object:Gem::Dependency
158
+ name: simplecov-csv
159
+ requirement: &7739560 !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
201
165
  type: :development
202
- - !ruby/object:Gem::Dependency
203
- requirement: &id013 !ruby/object:Gem::Requirement
166
+ prerelease: false
167
+ version_requirements: *7739560
168
+ - !ruby/object:Gem::Dependency
169
+ name: redcarpet
170
+ requirement: &7738420 !ruby/object:Gem::Requirement
204
171
  none: false
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- hash: 3
209
- segments:
210
- - 0
211
- version: "0"
212
- version_requirements: *id013
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: *7738420
179
+ - !ruby/object:Gem::Dependency
213
180
  name: yard
181
+ requirement: &7753620 !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ type: :development
214
188
  prerelease: false
189
+ version_requirements: *7753620
190
+ - !ruby/object:Gem::Dependency
191
+ name: yard-blame
192
+ requirement: &7752220 !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
215
198
  type: :development
216
- - !ruby/object:Gem::Dependency
217
- requirement: &id014 !ruby/object:Gem::Requirement
199
+ prerelease: false
200
+ version_requirements: *7752220
201
+ - !ruby/object:Gem::Dependency
202
+ name: pry
203
+ requirement: &7751620 !ruby/object:Gem::Requirement
218
204
  none: false
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- hash: 3
223
- segments:
224
- - 0
225
- version: "0"
226
- version_requirements: *id014
227
- name: yard-blame
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ type: :development
228
210
  prerelease: false
211
+ version_requirements: *7751620
212
+ - !ruby/object:Gem::Dependency
213
+ name: alf
214
+ requirement: &7750760 !ruby/object:Gem::Requirement
215
+ none: false
216
+ requirements:
217
+ - - ! '>='
218
+ - !ruby/object:Gem::Version
219
+ version: '0'
229
220
  type: :development
230
- - !ruby/object:Gem::Dependency
231
- requirement: &id015 !ruby/object:Gem::Requirement
221
+ prerelease: false
222
+ version_requirements: *7750760
223
+ - !ruby/object:Gem::Dependency
224
+ name: fastercsv
225
+ requirement: &7749820 !ruby/object:Gem::Requirement
232
226
  none: false
233
- requirements:
234
- - - ">="
235
- - !ruby/object:Gem::Version
236
- hash: 3
237
- segments:
238
- - 0
239
- version: "0"
240
- version_requirements: *id015
241
- name: pry
227
+ requirements:
228
+ - - ! '>='
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
242
232
  prerelease: false
233
+ version_requirements: *7749820
234
+ - !ruby/object:Gem::Dependency
235
+ name: viiite
236
+ requirement: &7749120 !ruby/object:Gem::Requirement
237
+ none: false
238
+ requirements:
239
+ - - ! '>='
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
243
242
  type: :development
244
- description: "IO::shuten \xE2\x80\x93 Use databases as IO handler like you would do with files and streams."
245
- email:
243
+ prerelease: false
244
+ version_requirements: *7749120
245
+ description: IO::shuten – Use databases as IO handler like you would do with files
246
+ and streams.
247
+ email:
246
248
  - chris@dinarrr.com
247
249
  executables: []
248
-
249
250
  extensions: []
250
-
251
- extra_rdoc_files:
251
+ extra_rdoc_files:
252
252
  - LICENSE
253
253
  - LICENSE.de
254
254
  - README.md
255
- files:
255
+ files:
256
256
  - .rspec
257
257
  - .rvmrc
258
258
  - .simplecov
@@ -264,7 +264,10 @@ files:
264
264
  - LICENSE.de
265
265
  - README.md
266
266
  - Rakefile
267
- - benchmark/compare_mem_w_buf.rb
267
+ - benchmark/viiite-template.rb
268
+ - benchmarks.sh
269
+ - benchmarks/buffer.rb
270
+ - benchmarks/memory.rb
268
271
  - doc/IO_3A_3ABuffer.html
269
272
  - doc/IO_shuten.html
270
273
  - doc/IO_shuten/Base.html
@@ -316,13 +319,20 @@ files:
316
319
  - lib/io_shuten/mongo.rb
317
320
  - lib/io_shuten/redis.rb
318
321
  - lib/io_shuten/stores.rb
322
+ - lib/io_shuten/stores/base_container.rb
319
323
  - lib/io_shuten/stores/mongo.rb
320
324
  - lib/io_shuten/stores/mongo/collection.rb
321
325
  - lib/io_shuten/stores/mongo/gridfs.rb
322
326
  - lib/io_shuten/stores/redis.rb
327
+ - lib/io_shuten/stores/redis/container.rb
323
328
  - lib/io_shuten/stores/redis/key_value.rb
329
+ - lib/io_shuten/stores/redis/key_value/collection.rb
330
+ - lib/io_shuten/stores/redis/key_value/single.rb
324
331
  - lib/io_shuten/stores/redis/pub_sub.rb
332
+ - lib/io_shuten/stores/redis/pub_sub/publisher.rb
333
+ - lib/io_shuten/stores/redis/pub_sub/subscriber.rb
325
334
  - lib/io_shuten/version.rb
335
+ - lib/io_shuten/zmq.rb
326
336
  - spec/examples/logger_spec.rb
327
337
  - spec/lib/buffer_spec.rb
328
338
  - spec/lib/memory_spec.rb
@@ -335,41 +345,34 @@ files:
335
345
  - spec/lib/stores/redis/pub_sub_spec.rb
336
346
  - spec/lib/stores/redis_spec.rb
337
347
  - spec/lib/stores_spec.rb
348
+ - spec/lib/zmq_spec.rb
338
349
  - spec/spec_helper.rb
339
350
  homepage: http://github.com/asaaki/io_shuten
340
- licenses:
351
+ licenses:
341
352
  - MIT
342
353
  post_install_message:
343
354
  rdoc_options: []
344
-
345
- require_paths:
355
+ require_paths:
346
356
  - lib
347
- required_ruby_version: !ruby/object:Gem::Requirement
357
+ required_ruby_version: !ruby/object:Gem::Requirement
348
358
  none: false
349
- requirements:
350
- - - ">="
351
- - !ruby/object:Gem::Version
352
- hash: 3
353
- segments:
359
+ requirements:
360
+ - - ! '>='
361
+ - !ruby/object:Gem::Version
362
+ version: '0'
363
+ segments:
354
364
  - 0
355
- version: "0"
356
- required_rubygems_version: !ruby/object:Gem::Requirement
365
+ hash: 1748778252042175746
366
+ required_rubygems_version: !ruby/object:Gem::Requirement
357
367
  none: false
358
- requirements:
359
- - - ">"
360
- - !ruby/object:Gem::Version
361
- hash: 25
362
- segments:
363
- - 1
364
- - 3
365
- - 1
368
+ requirements:
369
+ - - ! '>'
370
+ - !ruby/object:Gem::Version
366
371
  version: 1.3.1
367
372
  requirements: []
368
-
369
373
  rubyforge_project:
370
- rubygems_version: 1.8.10
374
+ rubygems_version: 1.8.15
371
375
  signing_key:
372
376
  specification_version: 3
373
- summary: "IO::shuten \xE2\x80\x93 Use databases as IO handler. (NOT YET READY FOR PRODUCTION!)"
377
+ summary: IO::shuten Use databases as IO handler. (NOT YET READY FOR PRODUCTION!)
374
378
  test_files: []
375
-
@@ -1,134 +0,0 @@
1
- # encoding: utf-8
2
- $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
- require "rubygems"
4
- require "benchmark"
5
- require "bundler/setup"
6
- require "io_shuten"
7
- require "logger"
8
-
9
- IOM = IO_shuten::Memory
10
- IOB = IO_shuten::Buffer
11
-
12
- loops_write = 5000
13
- loops_logger = 5000
14
- loops_files = 2000
15
- loops_files_outer = 5
16
-
17
- lorem_ipsum = <<LOREM
18
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
19
- tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
20
- At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
21
- no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
22
- consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
23
- dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
24
- dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
25
- ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
26
- diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
27
- voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
28
- gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
29
- LOREM
30
-
31
- tmp_path = File.expand_path("../../tmp", __FILE__)
32
- Dir.mkdir(tmp_path) unless File.exists?(tmp_path)
33
-
34
- puts
35
- puts "BENCHMARK: IO_shuten::Buffer vs IO_shuten::Memory #{ENV['TRAVIS'] ? '(TRAVIS CI)' : ''}"
36
-
37
- puts
38
- puts "WRITES"
39
- puts
40
- Benchmark.bmbm do |x|
41
- x.report "W IO_shuten::Buffer" do
42
- IO_shuten::Buffer.purge_instances!
43
- loops_write.times do |i|
44
- iob = IO_shuten::Buffer.new("wbuff-#{i}")
45
- iob.write lorem_ipsum
46
- end
47
- end
48
- x.report "W IO_shuten::Memory" do
49
- IO_shuten::Memory.purge_instances!
50
- loops_write.times do |i|
51
- iom = IO_shuten::Memory.new("wmem-#{i}")
52
- iom.write lorem_ipsum
53
- end
54
- end
55
- end
56
-
57
- puts
58
- puts "LOGGING"
59
- puts
60
- Benchmark.bmbm do |x|
61
- x.report "L IO_shuten::Buffer" do
62
- IO_shuten::Buffer.purge_instances!
63
- loops_logger.times do |i|
64
- logdev = IO_shuten::Buffer.new("logdev-#{i}")
65
- logger = Logger.new(logdev)
66
- logger.info lorem_ipsum
67
- logger.debug "counter: #{i}"
68
- end
69
- end
70
- x.report "L IO_shuten::Memory" do
71
- IO_shuten::Memory.purge_instances!
72
- loops_logger.times do |i|
73
- logdev = IO_shuten::Memory.new("logdev-#{i}")
74
- logger = Logger.new(logdev)
75
- logger.info lorem_ipsum
76
- logger.debug "counter: #{i}"
77
- end
78
- end
79
- end
80
-
81
- puts
82
- puts "FILE WRITES"
83
- puts
84
- Benchmark.bmbm do |x|
85
- x.report "FW IO_shuten::Buffer" do
86
- IO_shuten::Buffer.purge_instances!
87
- loops_files.times do |i|
88
- iob = IO_shuten::Buffer.new("#{tmp_path}/wbuff-#{i}")
89
- iob.write lorem_ipsum
90
- iob.save_to_file
91
- end
92
- end
93
- x.report "FW IO_shuten::Memory" do
94
- IO_shuten::Memory.purge_instances!
95
- loops_files.times do |i|
96
- iom = IO_shuten::Memory.new("#{tmp_path}/wmem-#{i}")
97
- iom.write lorem_ipsum
98
- iom.save_to_file
99
- end
100
- end
101
- end
102
-
103
- puts
104
- puts "FILE READS"
105
- puts
106
- Benchmark.bmbm do |x|
107
- x.report "FR IO_shuten::Buffer" do
108
- loops_files_outer.times do
109
- IO_shuten::Buffer.purge_instances!
110
- loops_files.times do |i|
111
- iob = IO_shuten::Buffer.new("#{tmp_path}/wbuff-#{i}")
112
- iob.load_from_file
113
- iob.read
114
- end
115
- end
116
- end
117
- x.report "FR IO_shuten::Memory" do
118
- loops_files_outer.times do
119
- IO_shuten::Memory.purge_instances!
120
- loops_files.times do |i|
121
- iom = IO_shuten::Memory.new("#{tmp_path}/wmem-#{i}")
122
- iom.load_from_file
123
- iom.read
124
- end
125
- end
126
- end
127
- end
128
-
129
- Dir["#{tmp_path}/**/*"].each do |f|
130
- File.unlink f
131
- end
132
-
133
- puts
134
- puts "/BENCHMARK"