heroku-tokyotyrant 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/COPYING +504 -0
  2. data/README.rdoc +231 -0
  3. data/Rakefile +72 -0
  4. data/benchmarks/balancer.rb +101 -0
  5. data/benchmarks/bulk_db.rb +74 -0
  6. data/benchmarks/bulk_table.rb +87 -0
  7. data/benchmarks/db.rb +114 -0
  8. data/benchmarks/table.rb +161 -0
  9. data/ext/extconf.rb +43 -0
  10. data/ext/tokyo/bin/tcamgr +0 -0
  11. data/ext/tokyo/bin/tcamttest +0 -0
  12. data/ext/tokyo/bin/tcatest +0 -0
  13. data/ext/tokyo/bin/tcbmgr +0 -0
  14. data/ext/tokyo/bin/tcbmttest +0 -0
  15. data/ext/tokyo/bin/tcbtest +0 -0
  16. data/ext/tokyo/bin/tcfmgr +0 -0
  17. data/ext/tokyo/bin/tcfmttest +0 -0
  18. data/ext/tokyo/bin/tcftest +0 -0
  19. data/ext/tokyo/bin/tchmgr +0 -0
  20. data/ext/tokyo/bin/tchmttest +0 -0
  21. data/ext/tokyo/bin/tchtest +0 -0
  22. data/ext/tokyo/bin/tcrmgr +0 -0
  23. data/ext/tokyo/bin/tcrmttest +0 -0
  24. data/ext/tokyo/bin/tcrtest +0 -0
  25. data/ext/tokyo/bin/tctmgr +0 -0
  26. data/ext/tokyo/bin/tctmttest +0 -0
  27. data/ext/tokyo/bin/tcttest +0 -0
  28. data/ext/tokyo/bin/tcucodec +0 -0
  29. data/ext/tokyo/bin/tcumttest +0 -0
  30. data/ext/tokyo/bin/tcutest +0 -0
  31. data/ext/tokyo/bin/ttserver +0 -0
  32. data/ext/tokyo/bin/ttulmgr +0 -0
  33. data/ext/tokyo/bin/ttultest +0 -0
  34. data/ext/tokyo/include/tcadb.h +548 -0
  35. data/ext/tokyo/include/tcbdb.h +1101 -0
  36. data/ext/tokyo/include/tcfdb.h +858 -0
  37. data/ext/tokyo/include/tchdb.h +871 -0
  38. data/ext/tokyo/include/tcrdb.h +801 -0
  39. data/ext/tokyo/include/tctdb.h +1086 -0
  40. data/ext/tokyo/include/tculog.h +392 -0
  41. data/ext/tokyo/include/tcutil.h +4184 -0
  42. data/ext/tokyo/include/ttutil.h +494 -0
  43. data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
  44. data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
  45. data/ext/tokyo/lib/libtokyocabinet.a +0 -0
  46. data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
  47. data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
  48. data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
  49. data/ext/tokyo/lib/libtokyotyrant.a +0 -0
  50. data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
  51. data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
  52. data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
  53. data/ext/tokyo/lib/ttskeldir.bundle +0 -0
  54. data/ext/tokyo/lib/ttskelmock.bundle +0 -0
  55. data/ext/tokyo/lib/ttskelnull.bundle +0 -0
  56. data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
  57. data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
  58. data/ext/tokyo/sbin/ttservctl +163 -0
  59. data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
  60. data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
  61. data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
  62. data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
  63. data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
  64. data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
  65. data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
  66. data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
  67. data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
  68. data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
  69. data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
  70. data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
  71. data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
  72. data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
  73. data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
  74. data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
  75. data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
  76. data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
  77. data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
  78. data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
  79. data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
  80. data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
  81. data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
  82. data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
  83. data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
  84. data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
  85. data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
  86. data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
  87. data/ext/tokyo/share/man/man3/tclist.3 +1 -0
  88. data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
  89. data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
  90. data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
  91. data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
  92. data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
  93. data/ext/tokyo/share/man/man3/tctree.3 +1 -0
  94. data/ext/tokyo/share/man/man3/tculog.3 +15 -0
  95. data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
  96. data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
  97. data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
  98. data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
  99. data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
  100. data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
  101. data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
  102. data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
  103. data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
  104. data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
  105. data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
  106. data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
  107. data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
  108. data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
  109. data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
  110. data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
  111. data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
  112. data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
  113. data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
  114. data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
  115. data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
  116. data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
  117. data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
  118. data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
  119. data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
  120. data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
  121. data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
  122. data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
  123. data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
  124. data/ext/tokyo_tyrant.c +147 -0
  125. data/ext/tokyo_tyrant.h +48 -0
  126. data/ext/tokyo_tyrant_db.c +227 -0
  127. data/ext/tokyo_tyrant_db.h +8 -0
  128. data/ext/tokyo_tyrant_module.c +453 -0
  129. data/ext/tokyo_tyrant_module.h +10 -0
  130. data/ext/tokyo_tyrant_query.c +226 -0
  131. data/ext/tokyo_tyrant_query.h +9 -0
  132. data/ext/tokyo_tyrant_table.c +319 -0
  133. data/ext/tokyo_tyrant_table.h +8 -0
  134. data/ext/tokyocabinet-1.4.41/COPYING +504 -0
  135. data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
  136. data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
  137. data/ext/tokyocabinet-1.4.41/README +38 -0
  138. data/ext/tokyocabinet-1.4.41/THANKS +12 -0
  139. data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
  140. data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
  141. data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
  142. data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
  143. data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
  144. data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
  145. data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
  146. data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
  147. data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
  148. data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
  149. data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
  150. data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
  151. data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
  152. data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
  153. data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
  154. data/ext/tokyocabinet-1.4.41/configure +7402 -0
  155. data/ext/tokyocabinet-1.4.41/configure.in +362 -0
  156. data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
  157. data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
  158. data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
  159. data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
  160. data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
  161. data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
  162. data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
  163. data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
  164. data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
  165. data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
  166. data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
  167. data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
  168. data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
  169. data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
  170. data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
  171. data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
  172. data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
  173. data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
  174. data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
  175. data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
  176. data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
  177. data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
  178. data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
  179. data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
  180. data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
  181. data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
  182. data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
  183. data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
  184. data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
  185. data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
  186. data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
  187. data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
  188. data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
  189. data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
  190. data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
  191. data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
  192. data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
  193. data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
  194. data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
  195. data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
  196. data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
  197. data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
  198. data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
  199. data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
  200. data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
  201. data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
  202. data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
  203. data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
  204. data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
  205. data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
  206. data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
  207. data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
  208. data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
  209. data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
  210. data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
  211. data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
  212. data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
  213. data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
  214. data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
  215. data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
  216. data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
  217. data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
  218. data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
  219. data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
  220. data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
  221. data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
  222. data/ext/tokyocabinet-1.4.41/md5.c +381 -0
  223. data/ext/tokyocabinet-1.4.41/md5.h +101 -0
  224. data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
  225. data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
  226. data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
  227. data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
  228. data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
  229. data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
  230. data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
  231. data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
  232. data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
  233. data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
  234. data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
  235. data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
  236. data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
  237. data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
  238. data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
  239. data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
  240. data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
  241. data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
  242. data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
  243. data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
  244. data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
  245. data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
  246. data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
  247. data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
  248. data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
  249. data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
  250. data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
  251. data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
  252. data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
  253. data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
  254. data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
  255. data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
  256. data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
  257. data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
  258. data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
  259. data/ext/tokyotyrant-1.1.39/COPYING +504 -0
  260. data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
  261. data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
  262. data/ext/tokyotyrant-1.1.39/README +38 -0
  263. data/ext/tokyotyrant-1.1.39/THANKS +15 -0
  264. data/ext/tokyotyrant-1.1.39/configure +6979 -0
  265. data/ext/tokyotyrant-1.1.39/configure.in +300 -0
  266. data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
  267. data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
  268. data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
  269. data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
  270. data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
  271. data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
  272. data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
  273. data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
  274. data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
  275. data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
  276. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
  277. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
  278. data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
  279. data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
  280. data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
  281. data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
  282. data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
  283. data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
  284. data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
  285. data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
  286. data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
  287. data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
  288. data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
  289. data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
  290. data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
  291. data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
  292. data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
  293. data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
  294. data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
  295. data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
  296. data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
  297. data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
  298. data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
  299. data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
  300. data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
  301. data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
  302. data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
  303. data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
  304. data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
  305. data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
  306. data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
  307. data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
  308. data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
  309. data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
  310. data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
  311. data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
  312. data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
  313. data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
  314. data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
  315. data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
  316. data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
  317. data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
  318. data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
  319. data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
  320. data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
  321. data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
  322. data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
  323. data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
  324. data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
  325. data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
  326. data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
  327. data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
  328. data/lib/tokyo_tyrant/balancer.rb +189 -0
  329. data/spec/ext.lua +4 -0
  330. data/spec/plu_db.rb +538 -0
  331. data/spec/spec.rb +1 -0
  332. data/spec/spec_base.rb +17 -0
  333. data/spec/start_tyrants.sh +36 -0
  334. data/spec/stop_tyrants.sh +9 -0
  335. data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
  336. data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
  337. data/spec/tokyo_tyrant_query_spec.rb +159 -0
  338. data/spec/tokyo_tyrant_spec.rb +254 -0
  339. data/spec/tokyo_tyrant_table_spec.rb +301 -0
  340. metadata +402 -0
@@ -0,0 +1,2 @@
1
+ 10341718880075105600 datestr 2009.12.01 07:27:37 from postmaster@nomail.com (postmaster) subject Attx PostMaster x Tokyo Cabinets x Fast Index In x2009x x14x17x x xdatastore.vol01x02xTAR2x groupid 64 maxpartno 4
2
+ 9105636605948918107 datestr 2009.12.01 07:27:40 from postmaster@nomail.com (postmaster) subject Attx PostMaster x Tokyo Cabinets x Fast Index In x2009x x10x17x x x11 x Tokyo Cabinets x No Replacementxdirx groupid 64 maxpartno 45
@@ -0,0 +1,118 @@
1
+ #! /usr/bin/perl
2
+
3
+ #================================================================
4
+ # calccomp
5
+ # Measure elapsed time and database size of compression algos
6
+ #================================================================
7
+
8
+ use strict;
9
+ use warnings;
10
+ use Time::HiRes qw(gettimeofday);
11
+
12
+ use constant {
13
+ WORDFILE => '/usr/share/dict/words',
14
+ TSVFILE => 'words.tsv',
15
+ NULLFILE => '/dev/null',
16
+ BNUM => 262144,
17
+ LCNUM => 8192,
18
+ TESTCOUNT => 20,
19
+ REMOVETOP => 2,
20
+ REMOVEBOTTOM => 8,
21
+ };
22
+
23
+ open(IN, '<' . WORDFILE) or die(WORDFILE . ' could not be opened');
24
+ open(OUT, '>' . TSVFILE) or die(TSVFILE . ' could not be opened');
25
+ while(defined(my $word = <IN>)){
26
+ $word =~ s/[\t\r\n]//g;
27
+ next if(length($word) < 1);
28
+ printf OUT ("%s\t%d\n", $word, int(rand(10000)));
29
+ }
30
+ close(OUT);
31
+ close(IN);
32
+
33
+ my @commands = (
34
+ './tchmgr create casket-hash ' . BNUM . ' ; ./tchmgr importtsv casket-hash ' . TSVFILE,
35
+ './tchmgr list casket-hash >' . NULLFILE,
36
+ './tcbmgr create casket-btree ' . LCNUM . ' ; ./tcbmgr importtsv casket-btree ' . TSVFILE,
37
+ './tcbmgr list casket-btree >' . NULLFILE,
38
+ './tcbmgr create -td casket-bt-td ' . LCNUM . ' ; ./tcbmgr importtsv casket-bt-td ' . TSVFILE,
39
+ './tcbmgr list casket-bt-td >' . NULLFILE,
40
+ './tcbmgr create -tb casket-bt-tb ' . LCNUM . ' ; ./tcbmgr importtsv casket-bt-tb ' . TSVFILE,
41
+ './tcbmgr list casket-bt-tb >' . NULLFILE,
42
+ './tcbmgr create -tt casket-bt-tt ' . LCNUM . ' ; ./tcbmgr importtsv casket-bt-tt ' . TSVFILE,
43
+ './tcbmgr list casket-bt-tt >' . NULLFILE,
44
+ './tcbmgr create -tx casket-bt-tx ' . LCNUM . ' ; ./tcbmgr importtsv casket-bt-tx ' . TSVFILE,
45
+ './tcbmgr list casket-bt-tx >' . NULLFILE,
46
+ );
47
+
48
+ my @names = (
49
+ 'casket-hash',
50
+ 'casket-btree',
51
+ 'casket-bt-td',
52
+ 'casket-bt-tb',
53
+ 'casket-bt-tt',
54
+ 'casket-bt-tx',
55
+ );
56
+
57
+ foreach my $name (@names){
58
+ my @paths = glob("$name*");
59
+ foreach my $path (@paths){
60
+ unlink($path);
61
+ }
62
+ }
63
+
64
+ my @table;
65
+ foreach my $command (@commands){
66
+ system('sync ; sync');
67
+ $ENV{'HIDEPRGR'} = 1;
68
+ my @result;
69
+ for(my $i = 0; $i < TESTCOUNT; $i++){
70
+ my $stime = gettimeofday();
71
+ system("$command >/dev/null 2>&1");
72
+ $stime = gettimeofday() - $stime;
73
+ printf("%s\t%d\t%0.5f\n", $command, $i + 1, $stime);
74
+ push(@result, $stime);
75
+ }
76
+ @result = sort { $a <=> $b } @result;
77
+ for(my $i = 0; $i < REMOVETOP; $i++){
78
+ shift(@result);
79
+ }
80
+ for(my $i = 0; $i < REMOVEBOTTOM; $i++){
81
+ pop(@result);
82
+ }
83
+ my $sum = 0;
84
+ foreach my $result (@result){
85
+ $sum += $result;
86
+ }
87
+ my $avg = $sum / scalar(@result);
88
+ push(@table, [$command, $avg]);
89
+ }
90
+
91
+ printf("\n\nRESULT\n\n");
92
+ foreach my $row (@table){
93
+ printf("%s\t%0.5f\n", $$row[0], $$row[1]);
94
+ }
95
+ printf("\n");
96
+
97
+ my @sizes;
98
+ foreach my $name (@names){
99
+ my @sbuf = stat($name);
100
+ my $size = $sbuf[7];
101
+ printf("%s\t%s\n", $name, $size);
102
+ push(@sizes, $size);
103
+ }
104
+ my @sbuf = stat(TSVFILE);
105
+ my $size = $sbuf[7];
106
+ printf("\n");
107
+
108
+ printf("%s,%.5f,%.5f,%d\n", "ORIGINAL", 0, 0, $size);
109
+ printf("%s,%.5f,%.5f,%d\n", "HASH", $table[0][1], $table[1][1], $sizes[0]);
110
+ printf("%s,%.5f,%.5f,%d\n", "BTREE", $table[2][1], $table[3][1], $sizes[1]);
111
+ printf("%s,%.5f,%.5f,%d\n", "BTREE-DEFLATE", $table[4][1], $table[5][1], $sizes[2]);
112
+ printf("%s,%.5f,%.5f,%d\n", "BTREE-BZIP2", $table[6][1], $table[7][1], $sizes[3]);
113
+ printf("%s,%.5f,%.5f,%d\n", "BTREE-TCBS", $table[8][1], $table[9][1], $sizes[4]);
114
+ printf("%s,%.5f,%.5f,%d\n", "BTREE-EXCODEC", $table[10][1], $table[11][1], $sizes[5]);
115
+
116
+
117
+
118
+ # END OF FILE
@@ -0,0 +1,56 @@
1
+ #! /bin/sh
2
+
3
+ #================================================================
4
+ # datechange
5
+ # Replace date expressions
6
+ #================================================================
7
+
8
+
9
+ # set variables
10
+ LANG=C
11
+ LC_ALL=C
12
+ export LANG LC_ALL
13
+ year=`date '+%Y'`
14
+ date=`date '+%Y-%m-%d'`
15
+ fulldate=`date -R`
16
+ regexsrc='\.(h|c|cc|cpp|cxx|java|pl|pm|pod|rb|rd|lua)$'
17
+ regexman='\.[0-9]$'
18
+ regexhtml='\.html$'
19
+
20
+
21
+ # edit source files
22
+ find . -type f | egrep "$regexsrc" |
23
+ while read file
24
+ do
25
+ echo "$file"
26
+ sed "/opyright/ s/\\(20[0-9][0-9]\\)-\\(20[0-9][0-9]\\)/\\1-$year/" "$file" > "$file.tmp"
27
+ mv -f "$file.tmp" "$file"
28
+ done
29
+
30
+
31
+ # edit manual files
32
+ find . -type f | egrep "$regexman" |
33
+ while read file
34
+ do
35
+ echo "$file"
36
+ sed "/\\.TH/ s/\\(20[0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)/$date/" "$file" > "$file.tmp"
37
+ mv -f "$file.tmp" "$file"
38
+ done
39
+
40
+
41
+ # edit HTML files
42
+ find . -type f | egrep "$regexhtml" |
43
+ while read file
44
+ do
45
+ echo "$file"
46
+ sed -e "/opyright/ s/\\(20[0-9][0-9]\\)-\\(20[0-9][0-9]\\)/\\1-$year/" -e "/<div class=\"note\">/ s/Last Update: *\\([A-Z][a-z][a-z], [0-9][0-9] [A-Z][a-z][a-z] 20[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] +[0-9][0-9]*\\)/Last Update: $fulldate/" "$file" > "$file.tmp"
47
+ mv -f "$file.tmp" "$file"
48
+ done
49
+
50
+
51
+ # exit normally
52
+ exit 0
53
+
54
+
55
+
56
+ # END OF FILE
@@ -0,0 +1,45 @@
1
+ #! /bin/sh
2
+
3
+ #================================================================
4
+ # diffcheck
5
+ # List files different from ones of another version
6
+ #================================================================
7
+
8
+
9
+ # set variables
10
+ LANG=C
11
+ LC_ALL=C
12
+ export LANG LC_ALL
13
+ regex='\.(h|c|cc|cpp|cxx|java|pl|pm|pod|rb|rd|lua|[1-9]|html|txt)$'
14
+
15
+
16
+ # check arguments
17
+ if [ $# != 1 ]
18
+ then
19
+ printf 'diffcheck: usage: diffcheck directory_of_oldversion\n' 1>&2
20
+ exit 1
21
+ fi
22
+
23
+
24
+ # diff files
25
+ find . -type f | egrep $regex |
26
+ while read file
27
+ do
28
+ old=`printf '%s\n' "$file" | sed 's/^\.\///'`
29
+ printf 'Checking %s and %s ... ' "$file" "$1/$old"
30
+ res=`diff -q "$file" "$1/$old"`
31
+ if [ -z "$res" ]
32
+ then
33
+ printf 'same\n'
34
+ else
35
+ printf '### !!! DIFFERENT !!! ###\n'
36
+ fi
37
+ done
38
+
39
+
40
+ # exit normally
41
+ exit 0
42
+
43
+
44
+
45
+ # END OF FILE
@@ -0,0 +1,102 @@
1
+ #! /usr/bin/perl
2
+
3
+ #================================================================
4
+ # htmldoctotsv
5
+ # Generate TSV data from HTML documents
6
+ #================================================================
7
+
8
+ use strict;
9
+ use warnings;
10
+ use Encode;
11
+ use Cwd 'realpath';
12
+
13
+ my $path = '.';
14
+ my $mode_kv = 0;
15
+ my $mode_hex = 0;
16
+
17
+ for(my $i = 0; $i < scalar(@ARGV); $i++){
18
+ my $arg = $ARGV[$i];
19
+ if($arg =~ /^-/){
20
+ if($arg eq '-kv'){
21
+ $mode_kv = 1;
22
+ } elsif($arg eq '-x'){
23
+ $mode_hex = 1;
24
+ }
25
+ } else {
26
+ $path = $arg;
27
+ }
28
+ }
29
+
30
+ sub trimhtml {
31
+ my $text = shift;
32
+ $text =~ s/<[^>]*>/ /g;
33
+ $text =~ s/&lt;/</g;
34
+ $text =~ s/&gt;/>/g;
35
+ $text =~ s/&quot;/"/g;
36
+ $text =~ s/&nbsp;/ /g;
37
+ $text =~ s/&amp;/\&/g;
38
+ $text =~ s/\s+/ /g;
39
+ $text =~ s/^ *//;
40
+ $text =~ s/ *$//;
41
+ return $text;
42
+ }
43
+
44
+ $ENV{LANG} = "C";
45
+ $ENV{LC_ALL} = "C";
46
+ open(my $lfh, "find $path -type f -iregex '.*\.html?' -print | sort |") || die("could not open");
47
+ my $id = 0;
48
+ while(defined($path = <$lfh>)){
49
+ chomp($path);
50
+ $path = realpath($path);
51
+ next if(!defined($path));
52
+ my @stat = stat($path);
53
+ next if(scalar(@stat) < 10);
54
+ my $mtime = $stat[9];
55
+ open(my $ifh, "<$path") || next;
56
+ my $encname = "UTF-8";
57
+ my @lines;
58
+ while(defined(my $line = <$ifh>)){
59
+ push(@lines, $line);
60
+ if($line =~ /<meta.*content-type.*charset=/i){
61
+ $line =~ s/.*charset=?//i;
62
+ $line =~ s/[^-_a-zA-Z0-9].*//;
63
+ chomp($line);
64
+ $encname = $line if(length($line) > 0);
65
+ }
66
+ }
67
+ my $text = join('', @lines);
68
+ $text = encode("UTF-8", decode($encname, $text)) if($encname ne "UTF-8");
69
+ $text =~ s/<!--.*?-->//is;
70
+ my $title = "";
71
+ if($text =~ /<title[^>]*>[^<]*<\/title>/i){
72
+ $title = $text;
73
+ $title =~ s/.*<title[^>]*>([^<]*)<\/title>.*/$1/is;
74
+ $title = trimhtml($title);
75
+ }
76
+ $text =~ s/.*<body[^>]*>(.*)<\/body>.*/$1/is;
77
+ $text =~ s/<style[^>]*>.*?<\/style>//is;
78
+ $text =~ s/<script[^>]*>.*?<\/script>//is;
79
+ $text = trimhtml($text);
80
+ next if(length($title) < 1 && length($text) < 1);
81
+ $id++;
82
+ my $key = $mode_hex ? sprintf("%X", $id) : $id;
83
+ printf STDERR ("%d: saving: %s\n", $id, $path);
84
+ if($mode_kv){
85
+ $text = $title . " " . $text if(length($title) > 0);
86
+ printf("%s\t%s\n", $key, $text);
87
+ } else {
88
+ printf("%s", $key);
89
+ printf("\turl\t%s", $path);
90
+ printf("\tsize\t%s", length($text));
91
+ printf("\tmtime\t%s", $mtime);
92
+ printf("\ttitle\t%s", $title) if(length($title) > 0);
93
+ printf("\tbody\t%s", $text);
94
+ printf("\n");
95
+ }
96
+ close($ifh);
97
+ }
98
+ close($lfh);
99
+
100
+
101
+
102
+ # END OF FILE
@@ -0,0 +1,19 @@
1
+ # Tokyo Cabinet magic data
2
+ 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
3
+ >14 string x \b (%s)
4
+ >32 byte 0 \b, Hash
5
+ >32 byte 1 \b, B+ tree
6
+ >32 byte 2 \b, Fixed-length
7
+ >32 byte 3 \b, Table
8
+ >33 byte &1 \b, [open]
9
+ >33 byte &2 \b, [fatal]
10
+ >34 byte x \b, apow=%d
11
+ >35 byte x \b, fpow=%d
12
+ >36 byte &1 \b, [large]
13
+ >36 byte &2 \b, [deflate]
14
+ >36 byte &4 \b, [bzip]
15
+ >36 byte &8 \b, [tcbs]
16
+ >36 byte &16 \b, [excodec]
17
+ >40 lelong x \b, bnum=%d
18
+ >48 lelong x \b, rnum=%d
19
+ >56 lelong x \b, fsiz=%d
@@ -0,0 +1,27 @@
1
+ #! /bin/sh
2
+
3
+ #================================================================
4
+ # printenv.cgi
5
+ # Print CGI environment variables
6
+ #================================================================
7
+
8
+
9
+ # set variables
10
+ LANG=C
11
+ LC_ALL=C
12
+ export LANG LC_ALL
13
+
14
+
15
+ # output the result
16
+ printf 'Content-Type: text/plain\r\n'
17
+ printf '\r\n'
18
+
19
+ printenv | sort
20
+
21
+
22
+ # exit normally
23
+ exit 0
24
+
25
+
26
+
27
+ # END OF FILE
@@ -0,0 +1,26 @@
1
+ #! /bin/sh
2
+
3
+ #================================================================
4
+ # stepcount
5
+ # Find files including dispensable tab characters
6
+ #================================================================
7
+
8
+
9
+ # set variables
10
+ LANG=C
11
+ LC_ALL=C
12
+ export LANG LC_ALL
13
+ regex='(\.h|\.c|\.cc|\.java|\.pl|\.pm|\.xs|\.rb|\.js)$'
14
+
15
+
16
+ # count steps
17
+ files=`find . -type f | egrep $regex`
18
+ wc -l $files | sort -n
19
+
20
+
21
+ # exit normally
22
+ exit 0
23
+
24
+
25
+
26
+ # END OF FILE
@@ -0,0 +1,61 @@
1
+ #! /usr/bin/perl
2
+
3
+ #================================================================
4
+ # stopwatch
5
+ # Measure elapsed time of some test commands.
6
+ #================================================================
7
+
8
+ use strict;
9
+ use warnings;
10
+ use Time::HiRes qw(gettimeofday);
11
+
12
+ use constant {
13
+ TESTCOUNT => 20,
14
+ REMOVETOP => 2,
15
+ REMOVEBOTTOM => 8,
16
+ };
17
+
18
+ my @commands = (
19
+ "./tchtest write casket 1000000 1000000",
20
+ "./tchtest read casket",
21
+ "./tchtest rcat casket 1000000",
22
+ "./tcbtest write casket 1000000",
23
+ "./tcbtest read casket",
24
+ "./tcbtest rcat -lc 256 -nc 128 casket 100000",
25
+ );
26
+
27
+ my @table;
28
+ foreach my $command (@commands){
29
+ system("sync ; sync");
30
+ my @result;
31
+ for(my $i = 0; $i < TESTCOUNT; $i++){
32
+ my $stime = gettimeofday();
33
+ system("$command >/dev/null 2>&1");
34
+ $stime = gettimeofday() - $stime;
35
+ printf("%s\t%d\t%0.5f\n", $command, $i + 1, $stime);
36
+ push(@result, $stime);
37
+ }
38
+ @result = sort { $a <=> $b } @result;
39
+ for(my $i = 0; $i < REMOVETOP; $i++){
40
+ shift(@result);
41
+ }
42
+ for(my $i = 0; $i < REMOVEBOTTOM; $i++){
43
+ pop(@result);
44
+ }
45
+ my $sum = 0;
46
+ foreach my $result (@result){
47
+ $sum += $result;
48
+ }
49
+ my $avg = $sum / scalar(@result);
50
+ push(@table, [$command, $avg]);
51
+ }
52
+
53
+ printf("\n\nRESULT\n");
54
+ foreach my $row (@table){
55
+ printf("%s\t%0.5f\n", $$row[0], $$row[1]);
56
+ }
57
+ printf("\n");
58
+
59
+
60
+
61
+ # END OF FILE