This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'benchmark' | |
| require 'tokyocabinet' | |
| require 'digest/sha1' | |
| require 'pp' | |
| bdb = TokyoCabinet::BDB.new | |
| unless bdb.open("dbd-benchmark.dbd", TokyoCabinet::BDB::OWRITER | TokyoCabinet::BDB::OCREAT) | |
| exit | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'tokyotyrant' | |
| include TokyoTyrant | |
| # create the object | |
| rdb = RDB::new | |
| # connect to the server | |
| if !rdb.open("localhost", 1978) | |
| ecode = rdb.ecode | |
| STDERR.printf("open error: %s\n", rdb.errmsg(ecode)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'tokyocabinet' | |
| include TokyoCabinet | |
| # create the object | |
| hdb = HDB::new | |
| # open the database | |
| if(!hdb.open("casket.hdb", HDB::OWRITER | HDB::OCREAT)) | |
| ecode = hdb.ecode | |
| STDERR.printf("open error: %s\n", hdb.errmsg(ecode)) |
NewerOlder