Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
495bc870
Commit
495bc870
authored
Apr 16, 2013
by
Bradley C. Kuszmaul
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it compile [t:1904]
git-svn-id:
file:///svn/toku/tokudb@13650
c7de825b-a66e-492c-adef-691d508d4ae1
parent
8869faa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
release/examples/Makefile
release/examples/Makefile
+7
-3
release/examples/README.examples
release/examples/README.examples
+3
-3
release/examples/db-scan.c
release/examples/db-scan.c
+2
-2
No files found.
release/examples/Makefile
View file @
495bc870
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
release/examples/README.examples
View file @
495bc870
...
...
@@ -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
...
...
release/examples/db-scan.c
View file @
495bc870
...
...
@@ -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
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment