higgs 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +67 -0
- data/bin/higgs_apply_jlog +1 -1
- data/bin/higgs_backup +1 -1
- data/bin/higgs_dump_index +1 -1
- data/bin/higgs_dump_jlog +1 -1
- data/bin/higgs_ping +1 -1
- data/bin/higgs_verify +1 -1
- data/lib/cgi/session/higgs.rb +3 -3
- data/lib/higgs/block.rb +3 -3
- data/lib/higgs/cache.rb +17 -13
- data/lib/higgs/dbm.rb +3 -3
- data/lib/higgs/exceptions.rb +3 -3
- data/lib/higgs/flock.rb +3 -3
- data/lib/higgs/index.rb +35 -17
- data/lib/higgs/jlog.rb +3 -3
- data/lib/higgs/lock.rb +5 -5
- data/lib/higgs/services.rb +3 -3
- data/lib/higgs/sman.rb +7 -3
- data/lib/higgs/storage.rb +14 -3
- data/lib/higgs/store.rb +3 -3
- data/lib/higgs/tar.rb +3 -3
- data/lib/higgs/thread.rb +130 -8
- data/lib/higgs/tman.rb +15 -13
- data/lib/higgs/utils/bman.rb +3 -3
- data/lib/higgs/utils.rb +3 -3
- data/lib/higgs/version.rb +4 -4
- data/lib/higgs.rb +2 -2
- data/misc/cache_bench/cache_bench.rb +2 -2
- data/misc/dbm_bench/.strc +1 -1
- data/misc/dbm_bench/Rakefile +1 -1
- data/misc/dbm_bench/dbm_multi_thread.rb +2 -2
- data/misc/dbm_bench/dbm_rnd_delete.rb +2 -2
- data/misc/dbm_bench/dbm_rnd_read.rb +2 -2
- data/misc/dbm_bench/dbm_rnd_update.rb +2 -2
- data/misc/dbm_bench/dbm_seq_read.rb +2 -2
- data/misc/dbm_bench/dbm_seq_write.rb +2 -2
- data/misc/dbm_bench/run.rb +52 -0
- data/misc/dbm_bench/st_verify.rb +2 -2
- data/misc/io_bench/cksum_bench.rb +1 -1
- data/misc/io_bench/jlog_bench.rb +2 -2
- data/misc/io_bench/write_bench.rb +1 -1
- data/misc/thread_bench/lock_bench.rb +2 -2
- data/test/Rakefile +1 -1
- data/test/run.rb +3 -3
- data/test/test_block.rb +1 -1
- data/test/test_cache.rb +9 -9
- data/test/test_cache_mvcc.rb +403 -168
- data/test/test_cgi_session.rb +3 -3
- data/test/test_dbm.rb +14 -5
- data/test/test_flock.rb +1 -1
- data/test/test_index.rb +5 -7
- data/test/test_jlog.rb +1 -1
- data/test/test_lock.rb +21 -21
- data/test/test_online_backup.rb +1 -1
- data/test/test_services.rb +1 -1
- data/test/test_storage.rb +4 -4
- data/test/test_storage_conf.rb +1 -1
- data/test/test_storage_init_opts.rb +1 -1
- data/test/test_store.rb +2 -2
- data/test/test_tar.rb +19 -19
- data/test/test_thread.rb +46 -46
- data/test/test_tman.rb +2 -2
- data/test/test_tman_init_opts.rb +1 -1
- data/test/test_tman_mvcc.rb +11 -11
- data/test/test_utils_bman.rb +4 -2
- metadata +10 -18
- data/Rakefile +0 -81
- data/mkrdoc.rb +0 -11
- data/rdoc.yml +0 -13
data/test/test_thread.rb
CHANGED
@@ -27,16 +27,16 @@ module Higgs::Test
|
|
27
27
|
include Timeout
|
28
28
|
|
29
29
|
# for ident(1)
|
30
|
-
CVS_ID = '$Id: test_thread.rb
|
30
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
31
31
|
|
32
32
|
def test_start_wait
|
33
33
|
latch = Latch.new
|
34
34
|
|
35
35
|
lock = Mutex.new
|
36
36
|
count = 0
|
37
|
-
|
37
|
+
th_list = []
|
38
38
|
COUNT_OF_THREADS.times do
|
39
|
-
|
39
|
+
th_list << Thread.new{
|
40
40
|
latch.wait
|
41
41
|
lock.synchronize{ count += 1 }
|
42
42
|
}
|
@@ -47,7 +47,7 @@ module Higgs::Test
|
|
47
47
|
|
48
48
|
latch.start
|
49
49
|
timeout(10) {
|
50
|
-
for t in
|
50
|
+
for t in th_list
|
51
51
|
t.join
|
52
52
|
end
|
53
53
|
}
|
@@ -61,16 +61,16 @@ module Higgs::Test
|
|
61
61
|
include Timeout
|
62
62
|
|
63
63
|
# for ident(1)
|
64
|
-
CVS_ID = '$Id: test_thread.rb
|
64
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
65
65
|
|
66
66
|
def test_count_down_wait
|
67
67
|
latch = CountDownLatch.new(3)
|
68
68
|
|
69
69
|
lock = Mutex.new
|
70
70
|
count = 0
|
71
|
-
|
71
|
+
th_list = []
|
72
72
|
COUNT_OF_THREADS.times do
|
73
|
-
|
73
|
+
th_list << Thread.new{
|
74
74
|
latch.wait
|
75
75
|
lock.synchronize{ count += 1 }
|
76
76
|
}
|
@@ -89,7 +89,7 @@ module Higgs::Test
|
|
89
89
|
|
90
90
|
latch.count_down
|
91
91
|
timeout(10) {
|
92
|
-
for t in
|
92
|
+
for t in th_list
|
93
93
|
t.join
|
94
94
|
end
|
95
95
|
}
|
@@ -103,7 +103,7 @@ module Higgs::Test
|
|
103
103
|
include Timeout
|
104
104
|
|
105
105
|
# for ident(1)
|
106
|
-
CVS_ID = '$Id: test_thread.rb
|
106
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
107
107
|
|
108
108
|
def test_wait
|
109
109
|
barrier = Barrier.new(COUNT_OF_THREADS)
|
@@ -117,17 +117,17 @@ module Higgs::Test
|
|
117
117
|
}
|
118
118
|
}
|
119
119
|
|
120
|
-
|
120
|
+
th_list = []
|
121
121
|
(COUNT_OF_THREADS - 1).times do
|
122
|
-
|
122
|
+
th_list << th_new.call
|
123
123
|
end
|
124
124
|
|
125
125
|
sleep(DELTA_T)
|
126
126
|
assert_equal(0, lock.synchronize{ count })
|
127
127
|
|
128
|
-
|
128
|
+
th_list << th_new.call
|
129
129
|
timeout(10) {
|
130
|
-
for t in
|
130
|
+
for t in th_list
|
131
131
|
t.join
|
132
132
|
end
|
133
133
|
}
|
@@ -147,7 +147,7 @@ module Higgs::Test
|
|
147
147
|
include Timeout
|
148
148
|
|
149
149
|
# for ident(1)
|
150
|
-
CVS_ID = '$Id: test_thread.rb
|
150
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
151
151
|
|
152
152
|
def calc
|
153
153
|
@s = 0 # @s's scope is over multi-threading
|
@@ -198,9 +198,9 @@ module Higgs::Test
|
|
198
198
|
lock = Mutex.new
|
199
199
|
count = 0
|
200
200
|
|
201
|
-
|
201
|
+
th_list = []
|
202
202
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
203
|
-
|
203
|
+
th_list << Thread.new{
|
204
204
|
barrier.wait
|
205
205
|
assert_equal(expected_result, work.result, "th#{i}")
|
206
206
|
lock.synchronize{ count += 1 }
|
@@ -212,7 +212,7 @@ module Higgs::Test
|
|
212
212
|
|
213
213
|
latch.start
|
214
214
|
timeout(10) {
|
215
|
-
for t in
|
215
|
+
for t in th_list
|
216
216
|
t.join
|
217
217
|
end
|
218
218
|
}
|
@@ -303,9 +303,9 @@ module Higgs::Test
|
|
303
303
|
}
|
304
304
|
|
305
305
|
barrier = Barrier.new(COUNT_OF_THREADS + 1)
|
306
|
-
|
306
|
+
th_list = []
|
307
307
|
COUNT_OF_THREADS.times{|i|# `i' should be local scope of thread block
|
308
|
-
|
308
|
+
th_list << Thread.new{
|
309
309
|
barrier.wait
|
310
310
|
assert_raise(RuntimeError, "thread: #{i}") {
|
311
311
|
work.result
|
@@ -314,7 +314,7 @@ module Higgs::Test
|
|
314
314
|
}
|
315
315
|
|
316
316
|
barrier.wait
|
317
|
-
for t in
|
317
|
+
for t in th_list
|
318
318
|
t.join
|
319
319
|
end
|
320
320
|
end
|
@@ -325,7 +325,7 @@ module Higgs::Test
|
|
325
325
|
include ThreadParams
|
326
326
|
|
327
327
|
# for ident(1)
|
328
|
-
CVS_ID = '$Id: test_thread.rb
|
328
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
329
329
|
|
330
330
|
def setup
|
331
331
|
@rw_lock = ReadWriteLock.new
|
@@ -352,11 +352,11 @@ module Higgs::Test
|
|
352
352
|
|
353
353
|
def test_read_lock_multithread
|
354
354
|
v = "foo"
|
355
|
-
|
355
|
+
th_list = []
|
356
356
|
barrier = Barrier.new(COUNT_OF_THREADS + 1)
|
357
357
|
|
358
358
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
359
|
-
|
359
|
+
th_list << Thread.new{
|
360
360
|
r_lock = @rw_lock.read_lock
|
361
361
|
r_lock.synchronize{
|
362
362
|
barrier.wait
|
@@ -368,18 +368,18 @@ module Higgs::Test
|
|
368
368
|
}
|
369
369
|
|
370
370
|
barrier.wait
|
371
|
-
for t in
|
371
|
+
for t in th_list
|
372
372
|
t.join
|
373
373
|
end
|
374
374
|
end
|
375
375
|
|
376
376
|
def test_write_lock_multithread
|
377
377
|
count = 0
|
378
|
-
|
378
|
+
th_list = []
|
379
379
|
barrier = Barrier.new(COUNT_OF_THREADS + 1)
|
380
380
|
|
381
381
|
COUNT_OF_THREADS.times do
|
382
|
-
|
382
|
+
th_list << Thread.new{
|
383
383
|
w_lock = @rw_lock.write_lock
|
384
384
|
barrier.wait
|
385
385
|
WORK_COUNT.times do
|
@@ -391,7 +391,7 @@ module Higgs::Test
|
|
391
391
|
end
|
392
392
|
|
393
393
|
barrier.wait
|
394
|
-
for t in
|
394
|
+
for t in th_list
|
395
395
|
t.join
|
396
396
|
end
|
397
397
|
assert_equal(COUNT_OF_THREADS * WORK_COUNT, count)
|
@@ -399,11 +399,11 @@ module Higgs::Test
|
|
399
399
|
|
400
400
|
def test_read_write_lock_multithread
|
401
401
|
count = 0
|
402
|
-
|
402
|
+
th_list = []
|
403
403
|
barrier = Barrier.new(COUNT_OF_THREADS * 2 + 1)
|
404
404
|
|
405
405
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
406
|
-
|
406
|
+
th_list << Thread.new{
|
407
407
|
r_lock = @rw_lock.read_lock
|
408
408
|
r_lock.synchronize{
|
409
409
|
barrier.wait
|
@@ -415,7 +415,7 @@ module Higgs::Test
|
|
415
415
|
}
|
416
416
|
|
417
417
|
COUNT_OF_THREADS.times do
|
418
|
-
|
418
|
+
th_list << Thread.new{
|
419
419
|
w_lock = @rw_lock.write_lock
|
420
420
|
barrier.wait
|
421
421
|
WORK_COUNT.times do
|
@@ -427,7 +427,7 @@ module Higgs::Test
|
|
427
427
|
end
|
428
428
|
|
429
429
|
barrier.wait
|
430
|
-
for t in
|
430
|
+
for t in th_list
|
431
431
|
t.join
|
432
432
|
end
|
433
433
|
assert_equal(COUNT_OF_THREADS * WORK_COUNT, count)
|
@@ -435,10 +435,10 @@ module Higgs::Test
|
|
435
435
|
|
436
436
|
def test_write_read_lock_multithread
|
437
437
|
count = 0
|
438
|
-
|
438
|
+
th_list = []
|
439
439
|
barrier = Barrier.new(COUNT_OF_THREADS + 2)
|
440
440
|
|
441
|
-
|
441
|
+
th_list << Thread.new{
|
442
442
|
w_lock = @rw_lock.write_lock
|
443
443
|
w_lock.synchronize{
|
444
444
|
barrier.wait
|
@@ -451,7 +451,7 @@ module Higgs::Test
|
|
451
451
|
}
|
452
452
|
|
453
453
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
454
|
-
|
454
|
+
th_list << Thread.new{
|
455
455
|
r_lock = @rw_lock.read_lock
|
456
456
|
barrier.wait
|
457
457
|
r_lock.synchronize{
|
@@ -461,7 +461,7 @@ module Higgs::Test
|
|
461
461
|
}
|
462
462
|
|
463
463
|
barrier.wait
|
464
|
-
for t in
|
464
|
+
for t in th_list
|
465
465
|
t.join
|
466
466
|
end
|
467
467
|
end
|
@@ -469,11 +469,11 @@ module Higgs::Test
|
|
469
469
|
def test_read_write_race
|
470
470
|
count = 0
|
471
471
|
value = true
|
472
|
-
|
472
|
+
th_list = []
|
473
473
|
barrier = Barrier.new(COUNT_OF_THREADS + 2)
|
474
474
|
|
475
475
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
476
|
-
|
476
|
+
th_list << Thread.new{
|
477
477
|
r_lock = @rw_lock.read_lock
|
478
478
|
barrier.wait
|
479
479
|
WORK_COUNT.times do
|
@@ -485,7 +485,7 @@ module Higgs::Test
|
|
485
485
|
}
|
486
486
|
}
|
487
487
|
|
488
|
-
|
488
|
+
th_list << Thread.new{
|
489
489
|
w_lock = @rw_lock.write_lock
|
490
490
|
barrier.wait
|
491
491
|
WORK_COUNT.times do
|
@@ -498,7 +498,7 @@ module Higgs::Test
|
|
498
498
|
}
|
499
499
|
|
500
500
|
barrier.wait
|
501
|
-
for t in
|
501
|
+
for t in th_list
|
502
502
|
t.join
|
503
503
|
end
|
504
504
|
end
|
@@ -509,7 +509,7 @@ module Higgs::Test
|
|
509
509
|
include ThreadParams
|
510
510
|
|
511
511
|
# for ident(1)
|
512
|
-
CVS_ID = '$Id: test_thread.rb
|
512
|
+
CVS_ID = '$Id: test_thread.rb 781 2008-07-28 15:13:27Z toki $'
|
513
513
|
|
514
514
|
class Counter
|
515
515
|
def initialize
|
@@ -528,11 +528,11 @@ module Higgs::Test
|
|
528
528
|
end
|
529
529
|
|
530
530
|
def test_transaction
|
531
|
-
|
531
|
+
th_list = []
|
532
532
|
barrier = Barrier.new(COUNT_OF_THREADS + 1)
|
533
533
|
|
534
534
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
535
|
-
|
535
|
+
th_list << Thread.new{
|
536
536
|
barrier.wait
|
537
537
|
WORK_COUNT.times do |j|
|
538
538
|
@pool.transaction{|c|
|
@@ -545,7 +545,7 @@ module Higgs::Test
|
|
545
545
|
}
|
546
546
|
|
547
547
|
barrier.wait
|
548
|
-
for t in
|
548
|
+
for t in th_list
|
549
549
|
t.join
|
550
550
|
end
|
551
551
|
|
@@ -560,12 +560,12 @@ module Higgs::Test
|
|
560
560
|
end
|
561
561
|
|
562
562
|
def test_shutdown
|
563
|
-
|
563
|
+
th_list = []
|
564
564
|
barrier = Barrier.new(COUNT_OF_THREADS + 1)
|
565
565
|
latch = CountDownLatch.new(COUNT_OF_THREADS)
|
566
566
|
|
567
567
|
COUNT_OF_THREADS.times{|i| # `i' should be local scope of thread block
|
568
|
-
|
568
|
+
th_list << Thread.new{
|
569
569
|
barrier.wait
|
570
570
|
assert_raise(Pool::ShutdownException) {
|
571
571
|
j = 0
|
@@ -585,7 +585,7 @@ module Higgs::Test
|
|
585
585
|
barrier.wait
|
586
586
|
latch.wait
|
587
587
|
@pool.shutdown
|
588
|
-
for t in
|
588
|
+
for t in th_list
|
589
589
|
t.join
|
590
590
|
end
|
591
591
|
end
|
data/test/test_tman.rb
CHANGED
@@ -15,7 +15,7 @@ module Higgs::Test
|
|
15
15
|
include Higgs
|
16
16
|
|
17
17
|
# for ident(1)
|
18
|
-
CVS_ID = '$Id: test_tman.rb
|
18
|
+
CVS_ID = '$Id: test_tman.rb 781 2008-07-28 15:13:27Z toki $'
|
19
19
|
|
20
20
|
def setup
|
21
21
|
@test_dir = 'st_test'
|
@@ -1088,7 +1088,7 @@ module Higgs::Test
|
|
1088
1088
|
|
1089
1089
|
class TransactionManagerTest_with_SecondaryCache < TransactionManagerTest
|
1090
1090
|
# for ident(1)
|
1091
|
-
CVS_ID = '$Id: test_tman.rb
|
1091
|
+
CVS_ID = '$Id: test_tman.rb 781 2008-07-28 15:13:27Z toki $'
|
1092
1092
|
|
1093
1093
|
def setup
|
1094
1094
|
super
|
data/test/test_tman_init_opts.rb
CHANGED
@@ -7,7 +7,7 @@ require 'yaml'
|
|
7
7
|
module Higgs::Test
|
8
8
|
class TransactionManagerInitOptionsTest < Test::Unit::TestCase
|
9
9
|
# for ident(1)
|
10
|
-
CVS_ID = '$Id: test_tman_init_opts.rb
|
10
|
+
CVS_ID = '$Id: test_tman_init_opts.rb 781 2008-07-28 15:13:27Z toki $'
|
11
11
|
|
12
12
|
include Higgs::TransactionManager::InitOptions
|
13
13
|
|
data/test/test_tman_mvcc.rb
CHANGED
@@ -46,20 +46,20 @@ module Higgs::Test
|
|
46
46
|
|
47
47
|
class RunFlag
|
48
48
|
def initialize(running)
|
49
|
-
|
49
|
+
@lock = Mutex.new
|
50
50
|
@running = running
|
51
51
|
end
|
52
52
|
|
53
53
|
def running=(running)
|
54
|
-
|
54
|
+
@lock.synchronize{
|
55
55
|
@running = running
|
56
|
-
|
56
|
+
}
|
57
57
|
end
|
58
58
|
|
59
59
|
def running?
|
60
|
-
|
60
|
+
@lock.synchronize{
|
61
61
|
@running
|
62
|
-
|
62
|
+
}
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -202,12 +202,12 @@ module Higgs::Test
|
|
202
202
|
|
203
203
|
def test_read_write_multithread_mvcc
|
204
204
|
do_read = RunFlag.new(true)
|
205
|
-
|
206
|
-
|
205
|
+
th_read_list = []
|
206
|
+
th_write_list = []
|
207
207
|
barrier = Barrier.new((READ_THREAD_COUNT + WRITE_THREAD_COUNT) + 1)
|
208
208
|
|
209
209
|
READ_THREAD_COUNT.times{|i|
|
210
|
-
|
210
|
+
th_read_list << Thread.new{
|
211
211
|
barrier.wait
|
212
212
|
while (do_read.running?)
|
213
213
|
@tman.transaction(true) {|tx|
|
@@ -220,7 +220,7 @@ module Higgs::Test
|
|
220
220
|
}
|
221
221
|
|
222
222
|
WRITE_THREAD_COUNT.times{|i|
|
223
|
-
|
223
|
+
th_write_list << Thread.new{
|
224
224
|
barrier.wait
|
225
225
|
WORK_COUNT.times do |j|
|
226
226
|
begin
|
@@ -237,12 +237,12 @@ module Higgs::Test
|
|
237
237
|
}
|
238
238
|
|
239
239
|
barrier.wait
|
240
|
-
for t in
|
240
|
+
for t in th_write_list
|
241
241
|
t.join
|
242
242
|
end
|
243
243
|
|
244
244
|
do_read.running = false
|
245
|
-
for t in
|
245
|
+
for t in th_read_list
|
246
246
|
t.join
|
247
247
|
end
|
248
248
|
|
data/test/test_utils_bman.rb
CHANGED
@@ -15,13 +15,15 @@ module Higgs::Test
|
|
15
15
|
include Higgs
|
16
16
|
|
17
17
|
# for ident(1)
|
18
|
-
CVS_ID = '$Id: test_utils_bman.rb
|
18
|
+
CVS_ID = '$Id: test_utils_bman.rb 781 2008-07-28 15:13:27Z toki $'
|
19
19
|
|
20
20
|
STORAGE_ITEMS = (ENV['STORAGE_ITEMS'] || '100').to_i
|
21
21
|
WARM_START_ITEMS = (ENV['WARM_START_ITEMS'] || '1000').to_i
|
22
22
|
MAX_ITEM_BYTES = (ENV['MAX_ITEM_BYTES'] || '16384').to_i
|
23
23
|
ITEM_CHARS = ('A'..'Z').to_a + ('a'..'z').to_a
|
24
24
|
|
25
|
+
SERVICES_PORT = '17320'
|
26
|
+
|
25
27
|
def setup
|
26
28
|
srand(0)
|
27
29
|
@from_dir = 'bman_from'
|
@@ -34,7 +36,7 @@ module Higgs::Test
|
|
34
36
|
FileUtils.mkdir_p(@from_dir)
|
35
37
|
FileUtils.rm_rf(@to_dir) # for debug
|
36
38
|
FileUtils.mkdir_p(@to_dir)
|
37
|
-
@remote_services_uri =
|
39
|
+
@remote_services_uri = "druby://localhost:#{SERVICES_PORT}"; SERVICES_PORT.succ!
|
38
40
|
@from_st = Storage.new(@from,
|
39
41
|
:jlog_rotate_max => 0,
|
40
42
|
:logger => proc{|path|
|
metadata
CHANGED
@@ -3,14 +3,14 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: higgs
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2008-
|
6
|
+
version: 0.1.6
|
7
|
+
date: 2008-07-29 00:00:00 +09:00
|
8
8
|
summary: pure ruby transactional storage compatible with unix TAR format
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: toki@freedom.ne.jp
|
12
|
-
homepage:
|
13
|
-
rubyforge_project:
|
12
|
+
homepage: http://higgs.rubyforge.org/
|
13
|
+
rubyforge_project: higgs
|
14
14
|
description:
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
@@ -29,10 +29,6 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- TOKI Yoshinori
|
31
31
|
files:
|
32
|
-
- misc/dbm_bench/Rakefile
|
33
|
-
- test/Rakefile
|
34
|
-
- Rakefile
|
35
|
-
- misc/dbm_bench/.strc
|
36
32
|
- lib/cgi/session/higgs.rb
|
37
33
|
- lib/higgs/jlog.rb
|
38
34
|
- lib/higgs/utils/bman.rb
|
@@ -53,6 +49,8 @@ files:
|
|
53
49
|
- lib/higgs/version.rb
|
54
50
|
- lib/higgs/utils.rb
|
55
51
|
- lib/higgs.rb
|
52
|
+
- misc/dbm_bench/Rakefile
|
53
|
+
- misc/dbm_bench/.strc
|
56
54
|
- misc/cache_bench/cache_bench.rb
|
57
55
|
- misc/thread_bench/lock_bench.rb
|
58
56
|
- misc/dbm_bench/dbm_seq_read.rb
|
@@ -61,10 +59,14 @@ files:
|
|
61
59
|
- misc/dbm_bench/dbm_seq_write.rb
|
62
60
|
- misc/dbm_bench/st_verify.rb
|
63
61
|
- misc/dbm_bench/dbm_rnd_delete.rb
|
62
|
+
- misc/dbm_bench/run.rb
|
64
63
|
- misc/dbm_bench/dbm_rnd_update.rb
|
65
64
|
- misc/io_bench/write_bench.rb
|
66
65
|
- misc/io_bench/cksum_bench.rb
|
67
66
|
- misc/io_bench/jlog_bench.rb
|
67
|
+
- sample/count.rb
|
68
|
+
- sample/dbmtest.rb
|
69
|
+
- test/Rakefile
|
68
70
|
- test/test_cgi_session.rb
|
69
71
|
- test/test_utils_bman.rb
|
70
72
|
- test/test_lock.rb
|
@@ -88,16 +90,6 @@ files:
|
|
88
90
|
- test/test_store.rb
|
89
91
|
- test/test_jlog.rb
|
90
92
|
- test/test_online_backup.rb
|
91
|
-
- mkrdoc.rb
|
92
|
-
- sample/count.rb
|
93
|
-
- sample/dbmtest.rb
|
94
|
-
- rdoc.yml
|
95
|
-
- bin/higgs_apply_jlog
|
96
|
-
- bin/higgs_backup
|
97
|
-
- bin/higgs_dump_index
|
98
|
-
- bin/higgs_dump_jlog
|
99
|
-
- bin/higgs_ping
|
100
|
-
- bin/higgs_verify
|
101
93
|
- ChangeLog
|
102
94
|
- LICENSE
|
103
95
|
- README
|
data/Rakefile
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
# for ident(1)
|
2
|
-
CVS_ID = '$Id: Rakefile 678 2007-11-09 16:08:34Z toki $'
|
3
|
-
|
4
|
-
require 'lib/higgs/version'
|
5
|
-
require 'rake/gempackagetask'
|
6
|
-
require 'yaml'
|
7
|
-
|
8
|
-
LIB_DIR = 'lib'
|
9
|
-
TEST_DIR = 'test'
|
10
|
-
RDOC_DIR = 'api'
|
11
|
-
|
12
|
-
def cd_v(dir)
|
13
|
-
cd(dir, :verbose => true) {
|
14
|
-
yield
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
def load_rdoc_opts
|
19
|
-
YAML.load(IO.read('rdoc.yml'))
|
20
|
-
end
|
21
|
-
|
22
|
-
task :default
|
23
|
-
|
24
|
-
task :test do
|
25
|
-
cd_v TEST_DIR do
|
26
|
-
sh 'rake'
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
task :rdoc do
|
31
|
-
rdoc_opts = load_rdoc_opts
|
32
|
-
sh 'rdoc', *(rdoc_opts['CommonOptions'] + rdoc_opts['CommandLineOptions']).flatten
|
33
|
-
end
|
34
|
-
|
35
|
-
task :rdoc_clean do
|
36
|
-
rm_rf RDOC_DIR
|
37
|
-
end
|
38
|
-
|
39
|
-
task :rdoc_upload => [ :rdoc_clean, :rdoc ] do
|
40
|
-
sh 'scp', '-pr', RDOC_DIR, 'rubyforge.org:/var/www/gforge-projects/higgs/.'
|
41
|
-
end
|
42
|
-
|
43
|
-
spec = Gem::Specification.new{|s|
|
44
|
-
s.name = 'higgs'
|
45
|
-
s.version = Higgs::VERSION
|
46
|
-
s.summary = 'pure ruby transactional storage compatible with unix TAR format'
|
47
|
-
s.author = 'TOKI Yoshinori'
|
48
|
-
s.email = 'toki@freedom.ne.jp'
|
49
|
-
s.executables = %w[
|
50
|
-
higgs_apply_jlog
|
51
|
-
higgs_backup
|
52
|
-
higgs_dump_index
|
53
|
-
higgs_dump_jlog
|
54
|
-
higgs_ping
|
55
|
-
higgs_verify
|
56
|
-
]
|
57
|
-
s.files = Dir['**/{Rakefile,.strc,*.{rb,yml}}']
|
58
|
-
s.files += %w[ ChangeLog LICENSE README ]
|
59
|
-
s.test_files = %w[ test/run.rb ]
|
60
|
-
s.has_rdoc = true
|
61
|
-
s.rdoc_options = load_rdoc_opts['CommonOptions'].flatten
|
62
|
-
}
|
63
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
64
|
-
pkg.need_zip = true
|
65
|
-
pkg.need_tar_gz = true
|
66
|
-
end
|
67
|
-
|
68
|
-
task :gem_install => [ :gem ] do
|
69
|
-
sh 'gem', 'install', "pkg/higgs-#{Higgs::VERSION}.gem"
|
70
|
-
end
|
71
|
-
|
72
|
-
task :clean => [ :rdoc_clean, :clobber_package ] do
|
73
|
-
cd_v 'misc/dbm_bench' do
|
74
|
-
sh 'rake', 'clean'
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
# Local Variables:
|
79
|
-
# mode: Ruby
|
80
|
-
# indent-tabs-mode: nil
|
81
|
-
# End:
|
data/mkrdoc.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/usr/local/bin/ruby
|
2
|
-
|
3
|
-
# for ident(1)
|
4
|
-
CVS_ID = '$Id: mkrdoc.rb 604 2007-10-02 15:28:03Z toki $'
|
5
|
-
|
6
|
-
require 'fileutils'
|
7
|
-
require 'yaml'
|
8
|
-
|
9
|
-
rdoc_opts = YAML.load(IO.read('rdoc.yml'))
|
10
|
-
FileUtils.rm_rf(rdoc_opts['CommandLineOptions'].assoc('-o')[1], :verbose => true)
|
11
|
-
system('rdoc', *(rdoc_opts['CommonOptions'] + rdoc_opts['CommandLineOptions']).flatten)
|