tdb2: remove: it's now in SAMBA where it belongs.
tdb2: Add tools/tdb2dump, tools/tdb2restore, use "tdb2.h" includes. Simple port from the TDB1 versions. Also, change to "tdb2.h" includes so they can be built even in other directories in future.
tdb2: rename the tools to tdb2torture, tdb2tool and mktdb2 This means they can be installed in parallel with tdb1's tools.
tdb2: expand more slowly. We took the original expansion heuristic from TDB1, and they just fixed theirs, so copy that. Before: After: time ./growtdb-bench 250000 10 > /dev/null && ls -l /tmp/growtdb.tdb && time ./tdbtorture -s 0 && ls -l torture.tdb && ./speed --transaction 2000000 growtdb-bench.c: In function ‘main’: growtdb-bench.c:74:8: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result growtdb-bench.c:108:9: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result real 1m0.243s user 0m13.677s sys 0m4.336s -rw------- 1 rusty rusty 683302864 2011-04-27 21:03 /tmp/growtdb.tdb testing with 3 processes, 5000 loops, seed=0 OK real 1m24.074s user 0m0.344s sys 0m0.468s -rw------- 1 rusty rusty 836040 2011-04-27 21:04 torture.tdb Adding 2000000 records: 1015 ns (110551992 bytes) Finding 2000000 records: 641 ns (110551992 bytes) Missing 2000000 records: 445 ns (110551992 bytes) Traversing 2000000 records: 439 ns (110551992 bytes) Deleting 2000000 records: 807 ns (199517112 bytes) Re-adding 2000000 records: 851 ns (199517112 bytes) Appending 2000000 records: 1301 ns (376542552 bytes) Churning 2000000 records: 2423 ns (553641304 bytes)
tdb2: Add speed test to tdb and tdb2 Current results of speed test: $ ./speed 1000000 Adding 1000000 records: 14726 ns (67244816 bytes) Finding 1000000 records: 2844 ns (67244816 bytes) Missing 1000000 records: 2528 ns (67244816 bytes) Traversing 1000000 records: 2572 ns (67244816 bytes) Deleting 1000000 records: 5358 ns (67244816 bytes) Re-adding 1000000 records: 9176 ns (67244816 bytes) Appending 1000000 records: 3035 ns (67244816 bytes) Churning 1000000 records: 18139 ns (67565840 bytes) $ ./speed 100000 Adding 100000 records: 13270 ns (14349584 bytes) Finding 100000 records: 2769 ns (14349584 bytes) Missing 100000 records: 2422 ns (14349584 bytes) Traversing 100000 records: 2595 ns (14349584 bytes) Deleting 100000 records: 5331 ns (14349584 bytes) Re-adding 100000 records: 5875 ns (14349584 bytes) Appending 100000 records: 2751 ns (14349584 bytes) Churning 100000 records: 20666 ns (25771280 bytes) vs tdb1 (with hashsize 100003): $ ./speed 1000000 Adding 1000000 records: 8547 ns (44306432 bytes) Finding 1000000 records: 5595 ns (44306432 bytes) Missing 1000000 records: 3469 ns (44306432 bytes) Traversing 1000000 records: 4571 ns (44306432 bytes) Deleting 1000000 records: 12115 ns (44306432 bytes) Re-adding 1000000 records: 10505 ns (44306432 bytes) Appending 1000000 records: 10610 ns (44306432 bytes) Churning 1000000 records: 28697 ns (44306432 bytes) $ ./speed 100000 Adding 100000 records: 6030 ns (4751360 bytes) Finding 100000 records: 3141 ns (4751360 bytes) Missing 100000 records: 3143 ns (4751360 bytes) Traversing 100000 records: 4659 ns (4751360 bytes) Deleting 100000 records: 7891 ns (4751360 bytes) Re-adding 100000 records: 5913 ns (4751360 bytes) Appending 100000 records: 4242 ns (4751360 bytes) Churning 100000 records: 15300 ns (4751360 bytes)
tdb2: clean up makefile for tools
tdb2: tools/ As per-tdb's tools.