mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Make it compile [t:1904]
git-svn-id: file:///svn/toku/tokudb@13650 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
8869faa18c
commit
495bc87006
3 changed files with 12 additions and 8 deletions
|
@ -1,9 +1,13 @@
|
|||
default: db-insert db-insert-bdb
|
||||
TARGETS = db-insert db-insert-bdb db-scan db-scan-bdb
|
||||
default: $(TARGETS)
|
||||
CFLAGS = -g
|
||||
CPPFLAGS = -I./include
|
||||
LDFLAGS = -L.. -lfractaltreeindex -Wl,-rpath,..
|
||||
db-insert-bdb: db-insert.c
|
||||
cc -ldb db-insert.c -o db-insert-bdb -DBDB
|
||||
cc -ldb db-insert.c -o db-insert-bdb -DBDB $(CFLAGS)
|
||||
db-scan-bdb: db-insert.c
|
||||
cc -ldb db-scan.c -o db-scan-bdb -DBDB $(CFLAGS)
|
||||
default: db-insert
|
||||
|
||||
clean:
|
||||
rm -rf db-insert db-insert-bdb
|
||||
rm -rf $(TARGETS) bench
|
||||
|
|
|
@ -5,9 +5,9 @@ you cannot access a database created by Berkeley DB using the Tokutek
|
|||
DB, or vice-versa.
|
||||
|
||||
db-insert is a program that inserts random key-value pairs into a database.
|
||||
db-scan is a program that scans through the key-value pairs, reading every row, from a database.
|
||||
|
||||
To build it and run it (it's been tested on Fedora 10):
|
||||
$ cd db-insert
|
||||
$ make (Makes the binaries)
|
||||
Run the insertion workload under TokuDB:
|
||||
$ ./db-insert
|
||||
|
@ -38,10 +38,10 @@ Total time 1872.746582s for 8388608 insertions = 4479/s
|
|||
|
||||
The files are smaller for TokuDB than BDB.
|
||||
|
||||
$ ls -lh ../bench.tokudb/
|
||||
$ ls -lh bench.tokudb/
|
||||
total 39M
|
||||
-rwxrwxr-x 1 bradley bradley 39M 2009-07-28 15:36 bench.db
|
||||
$ ls -lh ../bench.bdb/
|
||||
$ ls -lh bench.bdb/
|
||||
total 322M
|
||||
-rw-r--r-- 1 bradley bradley 322M 2009-07-28 16:14 bench.db
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ DB_TXN *tid=0;
|
|||
|
||||
#define STRINGIFY2(s) #s
|
||||
#define STRINGIFY(s) STRINGIFY2(s)
|
||||
const char *dbdir = "../bench." STRINGIFY(DIRSUF); /* DIRSUF is passed in as a -D argument to the compiler. */
|
||||
const char *dbdir = "./bench." STRINGIFY(DIRSUF); /* DIRSUF is passed in as a -D argument to the compiler. */
|
||||
int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK;
|
||||
int env_open_flags_nox = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL;
|
||||
char *dbfilename = "bench.db";
|
||||
|
@ -440,7 +440,7 @@ int main (int argc, const char *argv[]) {
|
|||
#endif
|
||||
#if defined(__linux__) && __linux__
|
||||
char fname[256];
|
||||
sprintf(fname, "/proc/%d/status", toku_os_getpid());
|
||||
sprintf(fname, "/proc/%d/status", getpid());
|
||||
FILE *f = fopen(fname, "r");
|
||||
if (f) {
|
||||
char line[256];
|
||||
|
|
Loading…
Add table
Reference in a new issue