Man page - tchtest(1)
Packages contains this manual
apt-get install tokyocabinet-bin
Manual
TCHTEST
NAMEDESCRIPTION
SEE ALSO
NAME
tchtest - test cases of the hash database API
DESCRIPTION
To use the hash database API easily, the commands â tchtest â, â tchmttest â, and â tchmgr â are provided.
The command â tchtest â is a utility for facility test and performance test. This command is used in the following format. â path â specifies the path of a database file. â rnum â specifies the number of iterations. â bnum â specifies the number of buckets. â apow â specifies the power of the alignment. â fpow â specifies the power of the free block pool.
tchtest write [ -mt ] [ -tl ] [ -td | -tb | -tt | -tx ] [ -rc num ] [ -xm num ] [ -df num ] [ -nl | -nb ] [ -as ] [ -rnd ] path rnum [ bnum [ apow [ fpow ]]]
Store records with keys of 8 bytes. They change as â00000001â, â00000002â...
tchtest read [ -mt ] [ -rc num ] [ -xm num ] [ -df num ] [ -nl | -nb ] [ -wb ] [ -rnd ] path
Retrieve all records of the database above.
tchtest remove [ -mt ] [ -rc num ] [ -xm num ] [ -df num ] [ -nl | -nb ] [ -rnd ] path
Remove all records of the database above.
tchtest rcat [ -mt ] [ -tl ] [ -td | -tb | -tt | -tx ] [ -rc num ] [ -xm num ] [ -df num ] [ -nl | -nb ] [ -pn num ] [ -dai | -dad | -rl | -ru ] path rnum [ bnum [ apow [ fpow ]]]
Store records with partway duplicated keys using concatenate mode.
tchtest misc [ -mt ] [ -tl ] [ -td | -tb | -tt | -tx ] [ -nl | -nb ] path rnum
Perform miscellaneous test of various operations.
tchtest wicked [ -mt ] [ -tl ] [ -td | -tb | -tt | -tx ] [ -nl | -nb ] path rnum
Perform updating operations selected at random.
Options feature the following.
-mt
:
call the function âtchdbsetmutexâ.
-tl
: enable the option âHDBTLARGEâ.
-td
: enable the option âHDBTDEFLATEâ.
-tb
: enable the option âHDBTBZIPâ.
-tt
: enable the option âHDBTTCBSâ.
-tx
: enable the option âHDBTEXCODECâ.
-rc
num
: specify the number of cached records.
-xm
num
: specify the size of the extra mapped
memory.
-df
num
: specify the unit step number of auto
defragmentation.
-nl
: enable the option âHDBNOLCKâ.
-nb
: enable the option âHDBLCKNBâ.
-as
: use the function âtchdbputasyncâ
instead of âtchdbputâ.
-rnd
: select keys at random.
-wb
: use the function âtchdbget3â instead
of âtchdbgetâ.
-pn
num
: specify the number of patterns.
-dai
: use the function âtchdbaddintâ
instead of âtchdbputcatâ.
-dad
: use the function âtchdbadddoubleâ
instead of âtchdbputcatâ.
-rl
: set the length of values at random.
-ru
: select update operations at random.
This command returns 0 on success, another on failure.
SEE ALSO
tchmttest (1), tchmgr (1), tchdb (3), tokyocabinet (3)