Commit 958c4476 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

closes #5206 merge c++ changes to mainline

git-svn-id: file:///svn/toku/tokudb@45903 c7de825b-a66e-492c-adef-691d508d4ae1
parent 18babb78

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -7,6 +7,7 @@ include(TokuSetupIntelCompiler)
project(TokuDB)
# suppress -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
......@@ -25,7 +26,7 @@ set(LIBTOKUDB "tokudb" CACHE STRING "Name of libtokudb.so")
## add an option for cilk
option(USE_CILK "Use cilk in tokudb." OFF)
## can't use cilk without icc
if (USE_CILK AND (NOT CMAKE_C_COMPILER_ID MATCHES Intel))
if (USE_CILK AND (NOT CMAKE_CXX_COMPILER_ID MATCHES Intel))
message(FATAL_ERROR "You specified USE_CILK=ON so you need INTEL_CC=ON.")
endif ()
......
......@@ -143,8 +143,8 @@ if(NOT @RUN_PERF_TESTS@)
endif()
## don't run perf tests with valgrind (that's slow)
file(GLOB perf_test_srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/tests" perf_*.c)
string(REGEX REPLACE "\\.c(;|$)" ".tdb\\1" perf_tests "${perf_test_srcs}")
file(GLOB perf_test_srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/tests" perf_*.cc)
string(REGEX REPLACE "\\.cc(;|$)" ".tdb\\1" perf_tests "${perf_test_srcs}")
set(tdb_tests_that_should_fail "ydb/${perf_tests}")
string(REGEX REPLACE ";" ";ydb/" perf_tests "${perf_tests}")
list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${perf_tests})
......
......@@ -4,7 +4,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/runcat.sh" "#!/bin/bash
out=$1; shift
exec \"$@\" >$out")
add_executable(make_tdb make_tdb.c)
add_executable(make_tdb make_tdb)
set_property(TARGET make_tdb APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/db.h"
......
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
/*
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996,2007 Oracle. All rights reserved.
*
* $Id: db.in,v 12.158 2007/06/28 14:23:35 mjc Exp $
* $Id$
*
* db.h include file layout:
* General.
......
This diff is collapsed.
This diff is collapsed.
......@@ -27,6 +27,11 @@ SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
SET(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@")
SET(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@")
SET(CMAKE_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@")
SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
SET(CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
SET(CMAKE_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
SET(CMAKE_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
SET(CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@")
SET(CMAKE_TOP_BINARY_DIR "@CMAKE_TOP_BINARY_DIR@")
SET(LIBTOKUPORTABILITY "@LIBTOKUPORTABILITY@")
......@@ -67,11 +72,11 @@ ENDFOREACH()
SET(TARGET_O ${TARGET}_combined.o)
IF(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_C_COMPILER_ID STREQUAL Intel)
SET(flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
IF(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_CXX_COMPILER_ID STREQUAL Intel)
SET(flags "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
SEPARATE_ARGUMENTS(flags)
EXECUTE_PROCESS(
COMMAND ${CMAKE_C_COMPILER} ${flags} -ipo1 -ipo-c -diag-disable 10015 -o ${TARGET_O} ${ALL_OBJECTS}
COMMAND ${CMAKE_CXX_COMPILER} ${flags} -ipo1 -ipo-c -diag-disable 10015 -o ${TARGET_O} ${ALL_OBJECTS}
WORKING_DIRECTORY ${TEMP_DIR}
)
SET(TARGET_OBJECTS ${TARGET_O} ${ALL_EXTRA_OBJECTS})
......
## set up lists of sources and headers for tags
file(GLOB_RECURSE all_srcs
include/*.c
toku_include/*.c
buildheader/*.c
portability/*.c
ft/*.c
src/*.c
utils/*.c
db-benchmark-test/*.c
include/*.cc
toku_include/*.cc
buildheader/*.cc
portability/*.cc
ft/*.cc
src/*.cc
utils/*.cc
db-benchmark-test/*.cc
)
list(APPEND all_srcs
${CMAKE_CURRENT_BINARY_DIR}/ft/log_code.c
${CMAKE_CURRENT_BINARY_DIR}/ft/log_print.c
${CMAKE_CURRENT_BINARY_DIR}/ft/log_code.cc
${CMAKE_CURRENT_BINARY_DIR}/ft/log_print.cc
)
file(GLOB_RECURSE all_hdrs
include/*.h
......
......@@ -21,7 +21,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
# To produce a library we need at least one source file.
# It is created by ADD_CUSTOM_COMMAND below and will helps
# also help to track dependencies.
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.cc)
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
......
......@@ -101,9 +101,9 @@ endmacro(get_svn_wc_status)
## gather machine info
uname("-m" machine_type)
real_executable_name("${CMAKE_C_COMPILER}" real_c_compiler)
get_svn_revision("${CMAKE_CURRENT_SOURCE_DIR}" svn_revision) ## unused since it confuses cdash about history
get_svn_wc_status("${CMAKE_CURRENT_SOURCE_DIR}" wc_status) ## unused since it confuses cdash about history
real_executable_name("${CMAKE_CXX_COMPILER}" real_cxx_compiler)
#get_svn_revision("${CMAKE_CURRENT_SOURCE_DIR}" svn_revision) ## unused since it confuses cdash about history
#get_svn_wc_status("${CMAKE_CURRENT_SOURCE_DIR}" wc_status) ## unused since it confuses cdash about history
get_filename_component(branchname "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
hostname(host)
whoami(user)
......@@ -111,7 +111,7 @@ whoami(user)
## construct SITE, seems to have to happen before include(CTest)
set(SITE "${user}@${host}")
## construct BUILDNAME, seems to have to happen before include(CTest)
set(BUILDNAME "${branchname} ${CMAKE_BUILD_TYPE} ${CMAKE_SYSTEM} ${machine_type} ${CMAKE_C_COMPILER_ID} ${real_c_compiler} ${CMAKE_C_COMPILER_VERSION}" CACHE STRING "CTest build name" FORCE)
set(BUILDNAME "${branchname} ${CMAKE_BUILD_TYPE} ${CMAKE_SYSTEM} ${machine_type} ${CMAKE_CXX_COMPILER_ID} ${real_cxx_compiler} ${CMAKE_CXX_COMPILER_VERSION}" CACHE STRING "CTest build name" FORCE)
include(CTest)
......@@ -128,7 +128,7 @@ if (BUILD_TESTING)
set(CMAKE_HELGRIND_COMMAND_STRING "valgrind --quiet --tool=helgrind --error-exitcode=1 --suppressions=${TokuDB_SOURCE_DIR}/src/tests/helgrind.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind")
function(add_helgrind_test name)
if (CMAKE_SYSTEM_NAME MATCHES Darwin OR
((CMAKE_C_COMPILER_ID MATCHES Intel) AND
((CMAKE_CXX_COMPILER_ID MATCHES Intel) AND
(CMAKE_BUILD_TYPE MATCHES Release)) OR
USE_GCOV)
## can't use helgrind on osx or with optimized intel, no point in
......@@ -150,7 +150,7 @@ if (BUILD_TESTING)
set(CMAKE_DRD_COMMAND_STRING "valgrind --quiet --tool=drd --error-exitcode=1 --suppressions=${TokuDB_SOURCE_DIR}/src/tests/drd.suppressions --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind")
function(add_drd_test name)
if (CMAKE_SYSTEM_NAME MATCHES Darwin OR
((CMAKE_C_COMPILER_ID MATCHES Intel) AND
((CMAKE_CXX_COMPILER_ID MATCHES Intel) AND
(CMAKE_BUILD_TYPE MATCHES Release)) OR
USE_GCOV)
## can't use drd on osx or with optimized intel, no point in
......
## set c99 dialect
add_definitions("-std=c99")
function(add_c_defines)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${ARGN})
endfunction(add_c_defines)
## os name detection (threadpool-test.c needs this)
## os name detection (threadpool-test.cc needs this)
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
add_c_defines(DARWIN=1 _DARWIN_C_SOURCE)
elseif (CMAKE_SYSTEM_NAME MATCHES Linux)
......@@ -18,9 +15,11 @@ add_c_defines(
_XOPEN_SOURCE=600
_FILE_OFFSET_BITS=64
_LARGEFILE64_SOURCE
__STDC_FORMAT_MACROS
__STDC_LIMIT_MACROS
)
if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_C_COMPILER_ID MATCHES Clang)
if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin and with clang. TODO: remove this.")
add_c_defines(TOKU_ALLOW_DEPRECATED)
endif ()
......@@ -28,61 +27,90 @@ endif ()
## coverage
option(USE_GCOV "Use gcov for test coverage." OFF)
if (USE_GCOV)
if (NOT CMAKE_C_COMPILER_ID MATCHES GNU)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU)
message(FATAL_ERROR "Must use the GNU compiler to compile for test coverage.")
endif ()
endif (USE_GCOV)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
## adds a compiler flag if the compiler supports it
macro(set_cflags_if_supported)
foreach(flag ${ARGN})
check_c_compiler_flag(${flag} HAVE_${flag})
if (HAVE_${flag})
check_c_compiler_flag(${flag} HAVE_C_${flag})
if (HAVE_C_${flag})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
endif ()
check_cxx_compiler_flag(${flag} HAVE_CXX_${flag})
if (HAVE_CXX_${flag})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
endif ()
endforeach(flag)
endmacro(set_cflags_if_supported)
## adds a linker flag if the compiler supports it
macro(set_ldflags_if_supported)
foreach(flag ${ARGN})
check_cxx_compiler_flag(${flag} HAVE_${flag})
if (HAVE_${flag})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${flag}")
endif ()
endforeach(flag)
endmacro(set_ldflags_if_supported)
## disable some warnings
set_cflags_if_supported(
-Wno-self-assign
-Wno-missing-field-initializers
-Wno-maybe-uninitialized
-Wno-error=strict-overflow
)
set_ldflags_if_supported(
-Wno-error=strict-overflow
)
## set extra debugging flags and preprocessor definitions
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -ggdb -O1")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -ggdb -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -ggdb -O0")
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG FORTIFY_SOURCE=2)
## set extra release flags, we overwrite this because the default passes -DNDEBUG and we don't want that
if (CMAKE_C_COMPILER_ID STREQUAL Clang AND CMAKE_SYSTEM_NAME STREQUAL Darwin)
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_C_FLAGS_RELEASE "-g -O4")
set(CMAKE_CXX_FLAGS_RELEASE "-g -O4")
else ()
set(CMAKE_C_FLAGS_RELEASE "-g -O3")
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3")
## check how to do inter-procedural optimization
check_c_compiler_flag(-flto HAVE_CC_FLAG_FLTO)
check_c_compiler_flag(-ipo HAVE_CC_FLAG_IPO)
## add inter-procedural optimization flags
if (HAVE_CC_FLAG_FLTO)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto")
elseif (HAVE_CC_FLAG_IPO)
check_c_compiler_flag(-flto HAVE_C_FLAG_FLTO)
check_c_compiler_flag(-ipo HAVE_C_FLAG_IPO)
if (HAVE_C_FLAG_FLTO)
set(CMAKE_C_FLAGS_RELEASE "-O3 -flto")# -fuse-linker-plugin")
elseif (HAVE_C_FLAG_IPO)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ip -ipo1")
endif ()
check_cxx_compiler_flag(-flto HAVE_CXX_FLAG_FLTO)
check_cxx_compiler_flag(-ipo HAVE_CXX_FLAG_IPO)
if (HAVE_CXX_FLAG_FLTO)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -flto")# -fuse-linker-plugin")
elseif (HAVE_CXX_FLAG_IPO)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ip -ipo1")
endif ()
endif ()
## but we do want -DNVALGRIND
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NVALGRIND=1)
if (CMAKE_C_COMPILER_ID MATCHES Intel)
if (CMAKE_CXX_COMPILER_ID MATCHES Intel)
set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
## make sure intel libs are linked statically
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-intel")
## disable some intel-specific warnings
set(intel_warnings
94 # allow arrays of length 0
411 # allow const struct members without a constructor
589 # do not complain about goto that skips initialization
1292 # icc lies (it says it is "__GNUC__", but it doesn't handle the resulting macroexpansions from glibc 2.15.37 (which is designed for gcc 4.7, and appears in Fedora 17)
2259 # do not complain about "non-pointer conversion from int to u_int8_t (and other small types) may lose significant bits". this produces too many false positives
......@@ -93,17 +121,21 @@ if (CMAKE_C_COMPILER_ID MATCHES Intel)
)
string(REGEX REPLACE ";" "," intel_warning_string "${intel_warnings}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-disable ${intel_warning_string}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable ${intel_warning_string}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -diag-disable ${intel_warning_string}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -diag-disable ${intel_warning_string}")
## icc does -g differently
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -debug all")
## set icc warnings
set(CMAKE_C_FLAGS "-Wcheck ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -debug all")
set(CMAKE_CXX_FLAGS "-Wcheck ${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
## set gcc warnings
set(CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
## -Wc++-compat doesn't work with cmake's variable names so we do it individually here
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wc++-compat")
set(CMAKE_CXX_FLAGS "-Wextra ${CMAKE_CXX_FLAGS}")
set(WARN_CFLAGS
-Wbad-function-cast
-Wno-missing-noreturn
......@@ -127,7 +159,7 @@ else()
## -Wvector-optimization-performance
if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
message(WARNING "Disabling -Wcast-align and -Wshadow on osx. TODO: fix casting and shadowed declarations and re-enable them.")
elseif (CMAKE_C_COMPILER_ID STREQUAL Clang)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
message(WARNING "Disabling -Wcast-align with clang. TODO: fix casting and re-enable it.")
list(APPEND WARN_CFLAGS -Wshadow)
else ()
......@@ -138,18 +170,19 @@ endif()
set_cflags_if_supported(${WARN_CFLAGS})
## always want these
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
function(add_space_separated_property type obj propname val)
get_property(oldval ${type} ${obj} PROPERTY ${propname})
if (oldval MATCHES NOTFOUND)
set_property(${type} ${obj} PROPERTY ${propname} "${val}")
else ()
set_property(${type} ${obj} PROPERTY ${propname} "${oldval} ${val}")
set_property(${type} ${obj} PROPERTY ${propname} "${val} ${oldval}")
endif ()
endfunction(add_space_separated_property)
function(set_targets_need_intel_libs)
if (CMAKE_C_COMPILER_ID STREQUAL Intel)
if (CMAKE_CXX_COMPILER_ID STREQUAL Intel)
foreach(tgt ${ARGN})
target_link_libraries(${tgt} LINK_PUBLIC -Bstatic irc -Bdynamic c)
endforeach(tgt)
......
......@@ -10,6 +10,6 @@ if (INTEL_CC)
CMAKE_CXX_COMPILER MATCHES CMAKE_CXX_COMPILER-NOTFOUND OR
CMAKE_AR MATCHES CMAKE_AR-NOTFOUND OR
CMAKE_LINKER MATCHES CMAKE_LINKER-NOTFOUND)
message(FATAL_ERROR "Cannot find Intel compiler. You may need to run `. /opt/intel/bin/compilervars.sh intel64'")
message(FATAL_ERROR "Cannot find Intel compiler. You may need to run `source /opt/intel/bin/compilervars.sh intel64'")
endif ()
endif (INTEL_CC)
\ No newline at end of file
......@@ -112,13 +112,11 @@ int DbEnv::maybe_throw_error(int err) throw (DbException) {
return maybe_throw_error(err, this, do_no_exceptions);
}
extern "C" {
void toku_ydb_error_all_cases(const DB_ENV * env,
int error,
BOOL include_stderrstring,
BOOL use_stderr_if_nothing_else,
const char *fmt, va_list ap);
}
extern "C" void toku_ydb_error_all_cases(const DB_ENV * env,
int error,
BOOL include_stderrstring,
BOOL use_stderr_if_nothing_else,
const char *fmt, va_list ap);
void DbEnv::err(int error, const char *fmt, ...) {
va_list ap;
......
......@@ -17,9 +17,9 @@ set(tokudbonly_bins
if(BDB_FOUND)
foreach(bdb_bin ${both_bins})
add_executable(${bdb_bin}-bdb ${bdb_bin}.c)
add_executable(${bdb_bin}-bdb ${bdb_bin})
set_property(TARGET ${bdb_bin}-bdb APPEND PROPERTY
COMPILE_DEFINITIONS "DIRSUF=bdb;TOKU_ALLOW_DEPRECATED;ENVDIR=\"${bdb_bin}.c.bdb\"")
COMPILE_DEFINITIONS "DIRSUF=bdb;TOKU_ALLOW_DEPRECATED;ENVDIR=\"${bdb_bin}.cc.bdb\"")
set_target_properties(${bdb_bin}-bdb PROPERTIES
INCLUDE_DIRECTORIES "${BDB_INCLUDE_DIR};${CMAKE_CURRENT_BINARY_DIR}/../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../portability;${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(${bdb_bin}-bdb ${LIBTOKUPORTABILITY} ${BDB_LIBRARIES})
......@@ -28,9 +28,9 @@ if(BDB_FOUND)
endif()
foreach(tokudb_bin ${both_bins} ${tokudbonly_bins})
add_executable(${tokudb_bin}-tokudb ${tokudb_bin}.c)
add_executable(${tokudb_bin}-tokudb ${tokudb_bin})
set_property(TARGET ${tokudb_bin}-tokudb APPEND PROPERTY
COMPILE_DEFINITIONS "TOKUDB;ENVDIR=\"${tokudb_bin}.c.tdb\"")
COMPILE_DEFINITIONS "TOKUDB;ENVDIR=\"${tokudb_bin}.cc.tdb\"")
target_link_libraries(${tokudb_bin}-tokudb ${LIBTOKUDB} ${LIBTOKUPORTABILITY})
add_common_options_to_binary_targets(${tokudb_bin}-tokudb)
endforeach(tokudb_bin)
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <db.h>
#include "tokudb_common_funcs.h"
#include <assert.h>
static int verbose = 0;
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK;
static int env_open_flags_nox = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL;
int test_main(int argc, char * const argv[]) {
int r;
const char *envdir = "bench.tokudb";
const char *dbfilename = "bench.db";
bool do_txns = false;
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) {
verbose++;
continue;
}
if (strcmp(argv[i], "-q") == 0) {
if (verbose > 0)
verbose--;
continue;
}
if (strcmp(argv[i], "-x") == 0) {
do_txns = true;
continue;
}
}
DB_ENV *env = NULL;
r = db_env_create(&env, 0);
assert(r == 0);
r = env->open(env, envdir, do_txns ? env_open_flags_yesx : env_open_flags_nox, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
assert(r == 0);
DB *db = NULL;
r = db_create(&db, env, 0);
assert(r == 0);
r = db->open(db, NULL, dbfilename, NULL, DB_BTREE, DB_AUTO_COMMIT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
assert(r == 0);
if (verbose) {
DB_BTREE_STAT64 s;
r = db->stat64(db, NULL, &s); assert(r == 0);
printf("nkeys=%" PRIu64 " dsize=%" PRIu64 "\n", s.bt_nkeys, s.bt_dsize);
}
r = db->verify_with_progress(db, NULL, NULL, verbose > 0, false);
assert(r == 0);
r = db->close(db, 0);
assert(r == 0);
r = env->close(env, 0);
assert(r == 0);
return 0;
}
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <db.h>
#include "tokudb_common_funcs.h"
#include <assert.h>
static int verbose = 0;
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK;
static int env_open_flags_nox = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL;
int test_main(int argc, char * const argv[]) {
int r;
const char *envdir = "bench.tokudb";
const char *dbfilename = "bench.db";
bool do_txns = false;
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) {
verbose++;
continue;
}
if (strcmp(argv[i], "-q") == 0) {
if (verbose > 0)
verbose--;
continue;
}
if (strcmp(argv[i], "-x") == 0) {
do_txns = true;
continue;
}
}
DB_ENV *env = NULL;
r = db_env_create(&env, 0);
assert(r == 0);
r = env->open(env, envdir, do_txns ? env_open_flags_yesx : env_open_flags_nox, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
assert(r == 0);
DB *db = NULL;
r = db_create(&db, env, 0);
assert(r == 0);
r = db->open(db, NULL, dbfilename, NULL, DB_BTREE, DB_AUTO_COMMIT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
assert(r == 0);
if (verbose) {
DB_BTREE_STAT64 s;
r = db->stat64(db, NULL, &s); assert(r == 0);
printf("nkeys=%" PRIu64 " dsize=%" PRIu64 "\n", s.bt_nkeys, s.bt_dsize);
}
r = db->verify_with_progress(db, NULL, NULL, verbose > 0, false);
assert(r == 0);
r = db->close(db, 0);
assert(r == 0);
r = env->close(env, 0);
assert(r == 0);
return 0;
}
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/stat.h>
#include <db.h>
#include <toku_byteswap.h>
static int verbose = 0;
static int commit_flag = 0;
static int do_verify = 0;
static int nthread = 1;
static int maxk = 1000000;
static int do_multidb = 0;
static int usage(const char *prog) {
fprintf(stderr, "%s: run multi client single row insertions\n", prog);
fprintf(stderr, "[--n %d]\n", maxk);
fprintf(stderr, "[--nthread %d]\n", nthread);
fprintf(stderr, "[--verify] (%d)\n", do_verify);
fprintf(stderr, "[--nosync] (%d)\n", commit_flag);
fprintf(stderr, "[--multidb] (%d)\n", do_multidb);
return 1;
}
struct keygen {
pthread_mutex_t lock;
uint64_t k;
uint64_t maxk;
};
static void keygen_init(struct keygen *key, uint64_t _maxk) {
pthread_mutex_init(&key->lock, NULL);
key->k = 0;
key->maxk = _maxk;
}
static void keygen_destroy(struct keygen *key) {
pthread_mutex_destroy(&key->lock);
}
static int keygen_next(struct keygen *key, uint64_t *k) {
int r;
pthread_mutex_lock(&key->lock);
if (key->k >= key->maxk)
r = 1;
else {
*k = key->k++;
r = 0;
}
pthread_mutex_unlock(&key->lock);
return r;
}
struct inserter_arg {
struct keygen *keygen;
DB_ENV *env;
DB *db;
};
static int inserter(struct keygen *keygen, DB_ENV *env, DB *db) {
if (verbose) printf("%p %p %p\n", keygen, env, db);
while (1) {
uint64_t k;
int r = keygen_next(keygen, &k);
if (r != 0)
break;
if (verbose) printf("%d: %" PRIu64 "\n", (int) pthread_self(), k);
DB_TXN *txn;
r = env->txn_begin(env, NULL, &txn, 0);
assert(r == 0);
uint64_t kk = bswap_64(k);
DBT key = { .data = &kk, .size = sizeof kk };
DBT val = { .data = &k, .size = sizeof k };
r = db->put(db, txn, &key, &val, 0);
assert(r == 0);
r = txn->commit(txn, commit_flag);
assert(r == 0);
}
return 0;
}
static void *inserter_wrap(void *arg) {
if (verbose) printf("%d\n", (int) pthread_self());
struct inserter_arg *inserter_arg = (struct inserter_arg *) arg;
int r = inserter(inserter_arg->keygen, inserter_arg->env, inserter_arg->db);
assert(r == 0);
return arg;
}
static int verify(DB_ENV *env, DB *db, uint64_t _maxk) {
int r;
DB_TXN *txn;
r = env->txn_begin(env, NULL, &txn, 0);
assert(r == 0);
DBC *cursor;
r = db->cursor(db, txn, &cursor, 0);
assert(r == 0);
DBT key; memset(&key, 0, sizeof key);
DBT val; memset(&val, 0, sizeof val);
uint64_t i;
for (i=0; 1; i++) {
r = cursor->c_get(cursor, &key, &val, DB_NEXT);
if (r != 0)
break;
uint64_t k, v;
assert(key.size == sizeof k);
assert(val.size == sizeof v);
memcpy(&k, key.data, key.size);
k = bswap_64(k);
assert(i == k);
memcpy(&v, val.data, val.size);
assert(v == i);
}
assert(i == _maxk);
r = cursor->c_close(cursor);
assert(r == 0);
r = txn->commit(txn, 0);
assert(r == 0);
return 0;
}
static int env_init(DB_ENV **envptr, const char *envdir) {
int r;
DB_ENV *env;
r = db_env_create(&env, 0);
if (r == 0) {
// env setup
// env open
r = env->open(env, envdir, DB_CREATE+DB_PRIVATE+DB_INIT_LOCK+DB_INIT_LOG+DB_INIT_MPOOL+DB_INIT_TXN, 0777);
}
if (r == 0)
*envptr = env;
return r;
}
static int db_init(DB_ENV *env, const char *dbname, DB **dbptr) {
int r;
DB *db;
r = db_create(&db, env, 0);
if (r == 0) {
// db create
r = db->open(db, NULL, dbname, NULL, DB_BTREE, DB_CREATE, 0777);
if (r != 0) {
r = db->close(db, 0);
assert(r == 0);
}
}
if (r == 0)
*dbptr = db;
return r;
}
int main(int argc, char *argv[]) {
int r;
for (int i = 1; i < argc; i++) {
char *arg = argv[i];
if (strcmp(arg, "--nthread") == 0 && i+1 < argc) {
nthread = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--n") == 0 && i+1 < argc) {
maxk = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--verbose") == 0) {
verbose++;
continue;
}
if (strcmp(arg, "--nosync") == 0) {
commit_flag = DB_TXN_NOSYNC;
continue;
}
if (strcmp(arg, "--verify") == 0) {
do_verify++;
continue;
}
if (strcmp(arg, "--multidb") == 0) {
do_multidb++;
continue;
}
return usage(argv[0]);
}
int ndb = 1;
int nkeygen = 1;
if (do_multidb) {
ndb = nthread;
nkeygen = nthread;
}
const char *envdir = ENVDIR;
r = system("rm -rf " ENVDIR);
assert(r == 0);
r = mkdir(envdir, 0777);
assert(r == 0);
struct keygen keygen[nkeygen];
for (int i = 0; i < nkeygen; i++)
keygen_init(&keygen[i], maxk);
DB_ENV *env;
r = env_init(&env, envdir);
assert(r == 0);
DB *db[ndb];
for (int i = 0 ; i < ndb; i++) {
char dbname[32]; sprintf(dbname, "db%d", i);
r = db_init(env, dbname, &db[i]);
assert(r == 0);
}
pthread_t tids[nthread];
struct inserter_arg args[nthread];
for (int i = 0; i < nthread; i++) {
struct inserter_arg this_arg = { .keygen = &keygen[i % nkeygen], .env = env, .db = db[i % ndb] };
args[i] = this_arg;
pthread_create(&tids[i], NULL, inserter_wrap, &args[i]);
}
for (int i = 0; i < nthread; i++) {
void *retptr;
pthread_join(tids[i], &retptr);
}
for (int i = 0; i < ndb; i++) {
if (do_verify)
verify(env, db[i], maxk);
r = db[i]->close(db[i], 0);
assert(r == 0);
}
r = env->close(env, 0);
assert(r == 0);
for (int i = 0; i < nkeygen; i++)
keygen_destroy(&keygen[i]);
return 0;
}
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/stat.h>
#include <db.h>
#include <toku_byteswap.h>
static int verbose = 0;
static int commit_flag = 0;
static int do_verify = 0;
static int nthread = 1;
static int maxk = 1000000;
static int do_multidb = 0;
static int usage(const char *prog) {
fprintf(stderr, "%s: run multi client single row insertions\n", prog);
fprintf(stderr, "[--n %d]\n", maxk);
fprintf(stderr, "[--nthread %d]\n", nthread);
fprintf(stderr, "[--verify] (%d)\n", do_verify);
fprintf(stderr, "[--nosync] (%d)\n", commit_flag);
fprintf(stderr, "[--multidb] (%d)\n", do_multidb);
return 1;
}
struct keygen {
pthread_mutex_t lock;
uint64_t k;
uint64_t maxk;
};
static void keygen_init(struct keygen *key, uint64_t _maxk) {
pthread_mutex_init(&key->lock, NULL);
key->k = 0;
key->maxk = _maxk;
}
static void keygen_destroy(struct keygen *key) {
pthread_mutex_destroy(&key->lock);
}
static int keygen_next(struct keygen *key, uint64_t *k) {
int r;
pthread_mutex_lock(&key->lock);
if (key->k >= key->maxk)
r = 1;
else {
*k = key->k++;
r = 0;
}
pthread_mutex_unlock(&key->lock);
return r;
}
struct inserter_arg {
struct keygen *keygen;
DB_ENV *env;
DB *db;
};
static int inserter(struct keygen *keygen, DB_ENV *env, DB *db) {
if (verbose) printf("%p %p %p\n", keygen, env, db);
while (1) {
uint64_t k;
int r = keygen_next(keygen, &k);
if (r != 0)
break;
if (verbose) printf("%d: %" PRIu64 "\n", (int) pthread_self(), k);
DB_TXN *txn;
r = env->txn_begin(env, NULL, &txn, 0);
assert(r == 0);
uint64_t kk = bswap_64(k);
DBT key = { .data = &kk, .size = sizeof kk };
DBT val = { .data = &k, .size = sizeof k };
r = db->put(db, txn, &key, &val, 0);
assert(r == 0);
r = txn->commit(txn, commit_flag);
assert(r == 0);
}
return 0;
}
static void *inserter_wrap(void *arg) {
if (verbose) printf("%d\n", (int) pthread_self());
struct inserter_arg *inserter_arg = (struct inserter_arg *) arg;
int r = inserter(inserter_arg->keygen, inserter_arg->env, inserter_arg->db);
assert(r == 0);
return arg;
}
static int verify(DB_ENV *env, DB *db, uint64_t _maxk) {
int r;
DB_TXN *txn;
r = env->txn_begin(env, NULL, &txn, 0);
assert(r == 0);
DBC *cursor;
r = db->cursor(db, txn, &cursor, 0);
assert(r == 0);
DBT key; memset(&key, 0, sizeof key);
DBT val; memset(&val, 0, sizeof val);
uint64_t i;
for (i=0; 1; i++) {
r = cursor->c_get(cursor, &key, &val, DB_NEXT);
if (r != 0)
break;
uint64_t k, v;
assert(key.size == sizeof k);
assert(val.size == sizeof v);
memcpy(&k, key.data, key.size);
k = bswap_64(k);
assert(i == k);
memcpy(&v, val.data, val.size);
assert(v == i);
}
assert(i == _maxk);
r = cursor->c_close(cursor);
assert(r == 0);
r = txn->commit(txn, 0);
assert(r == 0);
return 0;
}
static int env_init(DB_ENV **envptr, const char *envdir) {
int r;
DB_ENV *env;
r = db_env_create(&env, 0);
if (r == 0) {
// env setup
// env open
r = env->open(env, envdir, DB_CREATE+DB_PRIVATE+DB_INIT_LOCK+DB_INIT_LOG+DB_INIT_MPOOL+DB_INIT_TXN, 0777);
}
if (r == 0)
*envptr = env;
return r;
}
static int db_init(DB_ENV *env, const char *dbname, DB **dbptr) {
int r;
DB *db;
r = db_create(&db, env, 0);
if (r == 0) {
// db create
r = db->open(db, NULL, dbname, NULL, DB_BTREE, DB_CREATE, 0777);
if (r != 0) {
r = db->close(db, 0);
assert(r == 0);
}
}
if (r == 0)
*dbptr = db;
return r;
}
int main(int argc, char *argv[]) {
int r;
for (int i = 1; i < argc; i++) {
char *arg = argv[i];
if (strcmp(arg, "--nthread") == 0 && i+1 < argc) {
nthread = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--n") == 0 && i+1 < argc) {
maxk = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--verbose") == 0) {
verbose++;
continue;
}
if (strcmp(arg, "--nosync") == 0) {
commit_flag = DB_TXN_NOSYNC;
continue;
}
if (strcmp(arg, "--verify") == 0) {
do_verify++;
continue;
}
if (strcmp(arg, "--multidb") == 0) {
do_multidb++;
continue;
}
return usage(argv[0]);
}
int ndb = 1;
int nkeygen = 1;
if (do_multidb) {
ndb = nthread;
nkeygen = nthread;
}
const char *envdir = ENVDIR;
r = system("rm -rf " ENVDIR);
assert(r == 0);
r = mkdir(envdir, 0777);
assert(r == 0);
struct keygen keygen[nkeygen];
for (int i = 0; i < nkeygen; i++)
keygen_init(&keygen[i], maxk);
DB_ENV *env;
r = env_init(&env, envdir);
assert(r == 0);
DB *db[ndb];
for (int i = 0 ; i < ndb; i++) {
char dbname[32]; sprintf(dbname, "db%d", i);
r = db_init(env, dbname, &db[i]);
assert(r == 0);
}
pthread_t tids[nthread];
struct inserter_arg args[nthread];
for (int i = 0; i < nthread; i++) {
struct inserter_arg this_arg = { .keygen = &keygen[i % nkeygen], .env = env, .db = db[i % ndb] };
args[i] = this_arg;
pthread_create(&tids[i], NULL, inserter_wrap, &args[i]);
}
for (int i = 0; i < nthread; i++) {
void *retptr;
pthread_join(tids[i], &retptr);
}
for (int i = 0; i < ndb; i++) {
if (do_verify)
verify(env, db[i], maxk);
r = db[i]->close(db[i], 0);
assert(r == 0);
}
r = env->close(env, 0);
assert(r == 0);
for (int i = 0; i < nkeygen; i++)
keygen_destroy(&keygen[i]);
return 0;
}
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
#include <toku_portability.h>
#include "tokudb_common_funcs.h"
#include <toku_pthread.h>
#include <toku_assert.h>
#include <db.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
static DB_ENV *env = NULL;
static DB *db = NULL;
#define STRINGIFY2(s) #s
#define STRINGIFY(s) STRINGIFY2(s)
static const char *dbdir = "./bench." STRINGIFY(DIRSUF); /* DIRSUF is passed in as a -D argument to the compiler. */
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK|DB_RECOVER|DB_THREAD;
// static int env_open_flags_nox = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL;
static const char *dbfilename = "bench.db";
static u_int64_t cachesize = 127*1024*1024;
static int nqueries = 1000000;
static int nthreads = 1;
static const char *log_dir = NULL;
static long long set_count = 0;
static void pt_query_setup (void) {
int r;
r = db_env_create(&env, 0); assert(r==0);
r = env->set_cachesize(env, cachesize / (1<<30), cachesize % (1<<30), 1); assert(r==0);
if (log_dir) {
r = env->set_lg_dir(env, log_dir); assert(r==0);
}
r = env->open(env, dbdir, env_open_flags_yesx, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
r = db_create(&db, env, 0); assert(r==0);
r = db->open(db, NULL, dbfilename, NULL, DB_BTREE, DB_THREAD|DB_AUTO_COMMIT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
}
static void pt_query_shutdown (void) {
int r;
r = db->close(db, 0); assert(r==0);
r = env->close(env, 0); assert(r==0);
env = NULL;
}
static unsigned long long maxkey;
enum { SERIAL_SPACING = 1<<6 };
static const int keylen=8;
static double gettime (void) {
struct timeval tv;
int r = gettimeofday(&tv, 0);
assert(r==0);
return tv.tv_sec + 1e-6*tv.tv_usec;
}
/* From db-benchmark-test.c */
static void long_long_to_array (unsigned char *a, int array_size, unsigned long long l) {
for (int i=0; i<8 && i<array_size; i++)
a[i] = (l>>(56-8*i))&0xff;
}
static void array_to_long_long (unsigned long long *l, unsigned char *a, int array_size) {
*l = 0;
for(int i=0; i<8 && i<array_size; i++) {
unsigned long long tmp = a[i] & 0xff;
*l += tmp << (56-8*i);
}
}
#if TOKUDB
static int do_nothing (DBT const* UU(key), DBT const* UU(data), void* UU(extrav)) {
return TOKUDB_CURSOR_CONTINUE;
}
#endif
static void test_begin_commit(int _nqueries) {
int r;
unsigned long long k;
unsigned char kv[keylen];
for (int i = 0; i < _nqueries; i++) {
DB_TXN *txn = NULL;
r = env->txn_begin(env, NULL, &txn, DB_TXN_SNAPSHOT); assert_zero(r);
DBC *c = NULL;
r = db->cursor(db, txn, &c, 0); assert_zero(r);
k = (random() + (random() << 31)) % maxkey;
k = ( k / SERIAL_SPACING ) * SERIAL_SPACING;
long_long_to_array(kv, keylen, k);
DBT key = { .data = kv, .size = 8 };
DBT val = { .data = NULL, .size = 0 };
#if TOKUDB
r = c->c_getf_set(c, 0, &key, do_nothing, &val);
#else
r = c->c_get(c, &key, &val, DB_SET);
#endif
assert_zero(r);
(void) __sync_fetch_and_add(&set_count, 1);
r = c->c_close(c); assert_zero(r);
r = txn->commit(txn, 0); assert_zero(r);
}
}
// read in the entire DB, warming up the cache
// - record maxkey
static void warmup(void) {
int r;
DB_TXN *txn=NULL;
DBC *c = NULL;
DBT key = { .data = NULL };
DBT val = { .data = NULL };
double tstart = gettime();
r = env->txn_begin(env, NULL, &txn, 0); assert_zero(r);
r = db->cursor(db, txn, &c, 0); assert_zero(r);
r = c->c_get(c, &key, &val, DB_FIRST); assert_zero(r);
assert(key.size == 8);
while ( r != DB_NOTFOUND ) {
#if TOKUDB
r = c->c_getf_next(c, DB_PRELOCKED, do_nothing, NULL);
#else
r = c->c_get(c, &key, &val, DB_NEXT);
#endif
if ( r != 0 && r != DB_NOTFOUND) assert_zero(r);
}
memset(&key, 0, sizeof key);
memset(&val, 0, sizeof val);
r = c->c_get(c, &key, &val, DB_LAST); assert_zero(r);
array_to_long_long(&maxkey, (unsigned char*)key.data, key.size);
r = c->c_close(c); assert_zero(r);
r = txn->commit(txn, 0); assert_zero(r);
double tdiff = gettime() - tstart;
unsigned long long rows = maxkey / SERIAL_SPACING;
printf("Warmup : read %12llu rows in %6.1fs %8.0f/s\n", rows, tdiff, rows/tdiff); fflush(stdout);
}
struct arg {
// DB_ENV *env;
// DB *db;
int nqueries;
// int nrows;
};
static void *test_thread(void *arg) {
struct arg *myarg = (struct arg *) arg;
test_begin_commit(myarg->nqueries);
return arg;
}
static void usage(void) {
fprintf(stderr, "--nqueries %d\n", nqueries);
fprintf(stderr, "--nthreads %d\n", nthreads);
fprintf(stderr, "--cachesize %" PRId64 "\n", cachesize);
}
int test_main(int argc, char * const argv[]) {
for (int i = 1; i < argc; i++) {
char * const arg = argv[i];
if (strcmp(arg, "--nqueries") == 0 && i+1 < argc) {
nqueries = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--nthreads") == 0 && i+1 < argc) {
nthreads = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--cachesize") == 0 && i+1 < argc) {
cachesize = atoll(argv[++i]);
continue;
}
usage();
return 1;
}
int r;
pt_query_setup();
warmup();
assert(nthreads > 0);
struct arg myargs[nthreads-1];
toku_pthread_t mytids[nthreads];
double tstart = gettime();
for (int i = 0; i < nthreads-1; i++) {
myargs[i] = (struct arg) { nqueries };
r = toku_pthread_create(&mytids[i], NULL, test_thread, &myargs[i]); assert_zero(r);
}
test_begin_commit(nqueries);
for (int i = 0; i < nthreads-1; i++) {
void *ret;
r = toku_pthread_join(mytids[i], &ret); assert_zero(r);
}
assert(set_count == nthreads * nqueries);
double tdiff = gettime() - tstart;
printf("Point Queries : read %12llu rows in %6.1fs %8.0f/s with %d threads\n", set_count, tdiff, set_count/tdiff, nthreads); fflush(stdout);
pt_query_shutdown();
return 0;
}
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <toku_portability.h>
#include "tokudb_common_funcs.h"
#include <toku_pthread.h>
#include <toku_assert.h>
#include <db.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
static DB_ENV *env = NULL;
static DB *db = NULL;
#define STRINGIFY2(s) #s
#define STRINGIFY(s) STRINGIFY2(s)
static const char *dbdir = "./bench." STRINGIFY(DIRSUF); /* DIRSUF is passed in as a -D argument to the compiler. */
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK|DB_RECOVER|DB_THREAD;
// static int env_open_flags_nox = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL;
static const char *dbfilename = "bench.db";
static u_int64_t cachesize = 127*1024*1024;
static int nqueries = 1000000;
static int nthreads = 1;
static const char *log_dir = NULL;
static long long set_count = 0;
static void pt_query_setup (void) {
int r;
r = db_env_create(&env, 0); assert(r==0);
r = env->set_cachesize(env, cachesize / (1<<30), cachesize % (1<<30), 1); assert(r==0);
if (log_dir) {
r = env->set_lg_dir(env, log_dir); assert(r==0);
}
r = env->open(env, dbdir, env_open_flags_yesx, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
r = db_create(&db, env, 0); assert(r==0);
r = db->open(db, NULL, dbfilename, NULL, DB_BTREE, DB_THREAD|DB_AUTO_COMMIT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
}
static void pt_query_shutdown (void) {
int r;
r = db->close(db, 0); assert(r==0);
r = env->close(env, 0); assert(r==0);
env = NULL;
}
static unsigned long long maxkey;
enum { SERIAL_SPACING = 1<<6 };
static const int keylen=8;
static double gettime (void) {
struct timeval tv;
int r = gettimeofday(&tv, 0);
assert(r==0);
return tv.tv_sec + 1e-6*tv.tv_usec;
}
/* From db-benchmark-test.c */
static void long_long_to_array (unsigned char *a, int array_size, unsigned long long l) {
for (int i=0; i<8 && i<array_size; i++)
a[i] = (l>>(56-8*i))&0xff;
}
static void array_to_long_long (unsigned long long *l, unsigned char *a, int array_size) {
*l = 0;
for(int i=0; i<8 && i<array_size; i++) {
unsigned long long tmp = a[i] & 0xff;
*l += tmp << (56-8*i);
}
}
#if TOKUDB
static int do_nothing (DBT const* UU(key), DBT const* UU(data), void* UU(extrav)) {
return TOKUDB_CURSOR_CONTINUE;
}
#endif
static void test_begin_commit(int _nqueries) {
int r;
unsigned long long k;
unsigned char kv[keylen];
for (int i = 0; i < _nqueries; i++) {
DB_TXN *txn = NULL;
r = env->txn_begin(env, NULL, &txn, DB_TXN_SNAPSHOT); assert_zero(r);
DBC *c = NULL;
r = db->cursor(db, txn, &c, 0); assert_zero(r);
k = (random() + (random() << 31)) % maxkey;
k = ( k / SERIAL_SPACING ) * SERIAL_SPACING;
long_long_to_array(kv, keylen, k);
DBT key = { .data = kv, .size = 8 };
DBT val = { .data = NULL, .size = 0 };
#if TOKUDB
r = c->c_getf_set(c, 0, &key, do_nothing, &val);
#else
r = c->c_get(c, &key, &val, DB_SET);
#endif
assert_zero(r);
(void) __sync_fetch_and_add(&set_count, 1);
r = c->c_close(c); assert_zero(r);
r = txn->commit(txn, 0); assert_zero(r);
}
}
// read in the entire DB, warming up the cache
// - record maxkey
static void warmup(void) {
int r;
DB_TXN *txn=NULL;
DBC *c = NULL;
DBT key = { .data = NULL };
DBT val = { .data = NULL };
double tstart = gettime();
r = env->txn_begin(env, NULL, &txn, 0); assert_zero(r);
r = db->cursor(db, txn, &c, 0); assert_zero(r);
r = c->c_get(c, &key, &val, DB_FIRST); assert_zero(r);
assert(key.size == 8);
while ( r != DB_NOTFOUND ) {
#if TOKUDB
r = c->c_getf_next(c, DB_PRELOCKED, do_nothing, NULL);
#else
r = c->c_get(c, &key, &val, DB_NEXT);
#endif
if ( r != 0 && r != DB_NOTFOUND) assert_zero(r);
}
memset(&key, 0, sizeof key);
memset(&val, 0, sizeof val);
r = c->c_get(c, &key, &val, DB_LAST); assert_zero(r);
array_to_long_long(&maxkey, (unsigned char*)key.data, key.size);
r = c->c_close(c); assert_zero(r);
r = txn->commit(txn, 0); assert_zero(r);
double tdiff = gettime() - tstart;
unsigned long long rows = maxkey / SERIAL_SPACING;
printf("Warmup : read %12llu rows in %6.1fs %8.0f/s\n", rows, tdiff, rows/tdiff); fflush(stdout);
}
struct arg {
// DB_ENV *env;
// DB *db;
int nqueries;
// int nrows;
};
static void *test_thread(void *arg) {
struct arg *myarg = (struct arg *) arg;
test_begin_commit(myarg->nqueries);
return arg;
}
static void usage(void) {
fprintf(stderr, "--nqueries %d\n", nqueries);
fprintf(stderr, "--nthreads %d\n", nthreads);
fprintf(stderr, "--cachesize %" PRId64 "\n", cachesize);
}
int test_main(int argc, char * const argv[]) {
for (int i = 1; i < argc; i++) {
char * const arg = argv[i];
if (strcmp(arg, "--nqueries") == 0 && i+1 < argc) {
nqueries = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--nthreads") == 0 && i+1 < argc) {
nthreads = atoi(argv[++i]);
continue;
}
if (strcmp(arg, "--cachesize") == 0 && i+1 < argc) {
cachesize = atoll(argv[++i]);
continue;
}
usage();
return 1;
}
int r;
pt_query_setup();
warmup();
assert(nthreads > 0);
struct arg myargs[nthreads-1];
toku_pthread_t mytids[nthreads];
double tstart = gettime();
for (int i = 0; i < nthreads-1; i++) {
myargs[i] = (struct arg) { nqueries };
r = toku_pthread_create(&mytids[i], NULL, test_thread, &myargs[i]); assert_zero(r);
}
test_begin_commit(nqueries);
for (int i = 0; i < nthreads-1; i++) {
void *ret;
r = toku_pthread_join(mytids[i], &ret); assert_zero(r);
}
assert(set_count == nthreads * nqueries);
double tdiff = gettime() - tstart;
printf("Point Queries : read %12llu rows in %6.1fs %8.0f/s with %d threads\n", set_count, tdiff, set_count/tdiff, nthreads); fflush(stdout);
pt_query_shutdown();
return 0;
}
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* Scan the bench.tokudb/bench.db over and over. */
#include <toku_portability.h>
#include "tokudb_common_funcs.h"
#include <toku_assert.h>
#include <db.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#ifndef TOKUDB
#error requires tokudb
#endif
static const char *pname;
static long limitcount=-1;
static u_int32_t cachesize = 16*1024*1024;
#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. */
static void parse_args (int argc, char *const argv[]) {
pname=argv[0];
argc--;
argv++;
while (argc>0) {
if (strcmp(*argv, "--count")==0) {
char *end;
argv++; argc--;
errno=0; limitcount=strtol(*argv, &end, 10); assert(errno==0);
printf("Limiting count to %ld\n", limitcount);
} else if (strcmp(*argv, "--cachesize")==0 && argc>0) {
char *end;
argv++; argc--;
cachesize=(u_int32_t)strtol(*argv, &end, 10);
} else if (strcmp(*argv, "--env") == 0) {
argv++; argc--;
if (argc <= 0) goto print_usage;
dbdir = *argv;
} else {
print_usage:
fprintf(stderr, "Usage:\n%s\n", pname);
fprintf(stderr, " --count <count> read the first COUNT rows and then stop.\n");
fprintf(stderr, " --cachesize <n> set the env cachesize to <n>\n");
fprintf(stderr, " --env DIR\n");
exit(1);
}
argc--;
argv++;
}
}
DB_ENV *env;
DB *db;
DB_TXN *tid=0;
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK;
const char *dbfilename = "bench.db";
static void scanrace_setup (void) {
int r;
r = db_env_create(&env, 0); assert(r==0);
r = env->set_cachesize(env, 0, cachesize, 1); assert(r==0);
r = env->open(env, dbdir, env_open_flags_yesx, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
r = db_create(&db, env, 0); assert(r==0);
r = env->txn_begin(env, 0, &tid, 0); assert(r==0);
r = db->open(db, tid, dbfilename, NULL, DB_BTREE, 0, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
assert(r==0);
}
static void scanrace_shutdown (void) {
int r;
r = db->close(db, 0); assert(r==0);
r = tid->commit(tid, 0); assert(r==0);
r = env->close(env, 0); assert(r==0);
#if 0
{
extern int toku_os_get_max_rss(int64_t*);
int64_t mrss;
int r = toku_os_get_max_rss(&mrss);
assert(r==0);
printf("maxrss=%.2fMB\n", mrss/256.0);
}
#endif
}
static double gettime (void) {
struct timeval tv;
int r = gettimeofday(&tv, 0);
assert(r==0);
return tv.tv_sec + 1e-6*tv.tv_usec;
}
struct extra_count {
long long totalbytes;
int rowcounter;
};
static int
counttotalbytes (DBT const *key, DBT const *data, void *extrav) {
struct extra_count *e = cast_to_typeof(e) extrav;
e->totalbytes += key->size + data->size;
e->rowcounter++;
return 0;
}
static void scanrace_lwc (void) {
int r;
struct extra_count e = {0,0};
double prevtime = gettime();
DBC *dbc;
r = db->cursor(db, tid, &dbc, 0); assert(r==0);
r = dbc->c_pre_acquire_range_lock(dbc, db->dbt_neg_infty(), db->dbt_pos_infty());
assert(r==0);
long rowcounter=0;
while (0 == (r = dbc->c_getf_next(dbc, DB_PRELOCKED, counttotalbytes, &e))) {
//if (rowcounter%128==0) { printf("."); fflush(stdout); }
rowcounter++;
if (limitcount>0 && rowcounter>=limitcount) break;
}
r = dbc->c_close(dbc); assert(r==0);
double thistime = gettime();
double tdiff = thistime-prevtime;
printf("LWC Scan %lld bytes (%d rows) in %9.6fs at %9fMB/s\n", e.totalbytes, e.rowcounter, tdiff, 1e-6*e.totalbytes/tdiff);
}
static int test_main (int argc, char * const argv[]) {
parse_args(argc,argv);
scanrace_setup();
scanrace_lwc();
scanrace_shutdown();
#if defined __linux__ && __linux__
char fname[256];
sprintf(fname, "/proc/%d/status", toku_os_getpid());
FILE *f = fopen(fname, "r");
if (f) {
char line[256];
while (fgets(line, sizeof line, f)) {
int n;
if (sscanf(line, "VmPeak: %d", &n) || sscanf(line, "VmHWM: %d", &n) || sscanf(line, "VmRSS: %d", &n))
fputs(line, stdout);
}
fclose(f);
}
#endif
return 0;
}
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
/* Scan the bench.tokudb/bench.db over and over. */
#include <toku_portability.h>
#include "tokudb_common_funcs.h"
#include <toku_assert.h>
#include <db.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#ifndef TOKUDB
#error requires tokudb
#endif
static const char *pname;
static long limitcount=-1;
static u_int32_t cachesize = 16*1024*1024;
#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. */
static void parse_args (int argc, char *const argv[]) {
pname=argv[0];
argc--;
argv++;
while (argc>0) {
if (strcmp(*argv, "--count")==0) {
char *end;
argv++; argc--;
errno=0; limitcount=strtol(*argv, &end, 10); assert(errno==0);
printf("Limiting count to %ld\n", limitcount);
} else if (strcmp(*argv, "--cachesize")==0 && argc>0) {
char *end;
argv++; argc--;
cachesize=(u_int32_t)strtol(*argv, &end, 10);
} else if (strcmp(*argv, "--env") == 0) {
argv++; argc--;
if (argc <= 0) goto print_usage;
dbdir = *argv;
} else {
print_usage:
fprintf(stderr, "Usage:\n%s\n", pname);
fprintf(stderr, " --count <count> read the first COUNT rows and then stop.\n");
fprintf(stderr, " --cachesize <n> set the env cachesize to <n>\n");
fprintf(stderr, " --env DIR\n");
exit(1);
}
argc--;
argv++;
}
}
DB_ENV *env;
DB *db;
DB_TXN *tid=0;
static int env_open_flags_yesx = DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK;
const char *dbfilename = "bench.db";
static void scanrace_setup (void) {
int r;
r = db_env_create(&env, 0); assert(r==0);
r = env->set_cachesize(env, 0, cachesize, 1); assert(r==0);
r = env->open(env, dbdir, env_open_flags_yesx, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
r = db_create(&db, env, 0); assert(r==0);
r = env->txn_begin(env, 0, &tid, 0); assert(r==0);
r = db->open(db, tid, dbfilename, NULL, DB_BTREE, 0, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); assert(r==0);
assert(r==0);
}
static void scanrace_shutdown (void) {
int r;
r = db->close(db, 0); assert(r==0);
r = tid->commit(tid, 0); assert(r==0);
r = env->close(env, 0); assert(r==0);
#if 0
{
extern int toku_os_get_max_rss(int64_t*);
int64_t mrss;
int r = toku_os_get_max_rss(&mrss);
assert(r==0);
printf("maxrss=%.2fMB\n", mrss/256.0);
}
#endif
}
static double gettime (void) {
struct timeval tv;
int r = gettimeofday(&tv, 0);
assert(r==0);
return tv.tv_sec + 1e-6*tv.tv_usec;
}
struct extra_count {
long long totalbytes;
int rowcounter;
};
static int
counttotalbytes (DBT const *key, DBT const *data, void *extrav) {
struct extra_count *CAST_FROM_VOIDP(e, extrav);
e->totalbytes += key->size + data->size;
e->rowcounter++;
return 0;
}
static void scanrace_lwc (void) {
int r;
struct extra_count e = {0,0};
double prevtime = gettime();
DBC *dbc;
r = db->cursor(db, tid, &dbc, 0); assert(r==0);
r = dbc->c_pre_acquire_range_lock(dbc, db->dbt_neg_infty(), db->dbt_pos_infty());
assert(r==0);
long rowcounter=0;
while (0 == (r = dbc->c_getf_next(dbc, DB_PRELOCKED, counttotalbytes, &e))) {
//if (rowcounter%128==0) { printf("."); fflush(stdout); }
rowcounter++;
if (limitcount>0 && rowcounter>=limitcount) break;
}
r = dbc->c_close(dbc); assert(r==0);
double thistime = gettime();
double tdiff = thistime-prevtime;
printf("LWC Scan %lld bytes (%d rows) in %9.6fs at %9fMB/s\n", e.totalbytes, e.rowcounter, tdiff, 1e-6*e.totalbytes/tdiff);
}
static int test_main (int argc, char * const argv[]) {
parse_args(argc,argv);
scanrace_setup();
scanrace_lwc();
scanrace_shutdown();
#if defined __linux__ && __linux__
char fname[256];
sprintf(fname, "/proc/%d/status", toku_os_getpid());
FILE *f = fopen(fname, "r");
if (f) {
char line[256];
while (fgets(line, sizeof line, f)) {
int n;
if (sscanf(line, "VmPeak: %d", &n) || sscanf(line, "VmHWM: %d", &n) || sscanf(line, "VmRSS: %d", &n))
fputs(line, stdout);
}
fclose(f);
}
#endif
return 0;
}
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
#if !defined(TOKUDB_COMMON_FUNCS_H)
#define TOKUDB_COMMON_FUNCS_H
......
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
// run txn begin commit on multiple threads and measure the throughput
#include "toku_portability.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include "db.h"
#include "toku_pthread.h"
static double now(void) {
struct timeval tv;
int r = gettimeofday(&tv, NULL); assert(r == 0);
return tv.tv_sec * 1000000.0 + tv.tv_usec;
}
static void test_txn(DB_ENV *env, uint32_t ntxns, long usleep_time) {
int r;
for (uint32_t i = 0; i < ntxns; i++) {
DB_TXN *txn = NULL;
r = env->txn_begin(env, NULL, &txn, DB_TXN_SNAPSHOT); assert(r == 0);
r = txn->commit(txn, 0); assert(r == 0);
if (usleep_time)
usleep(usleep_time);
else
sched_yield();
}
}
struct arg {
DB_ENV *env;
uint32_t ntxns;
long usleep_time;
};
static void *test_thread(void *arg) {
struct arg *myarg = (struct arg *) arg;
test_txn(myarg->env, myarg->ntxns, myarg->usleep_time);
return arg;
}
int main(int argc, char * const argv[]) {
uint32_t ntxns = 1000000;
uint32_t nthreads = 1;
long usleep_time = 0;
for (int i = 1; i < argc; i++) {
char * const arg = argv[i];
if (strcmp(arg, "--ntxns") == 0 && i+1 < argc) {
ntxns = atoll(argv[++i]);
continue;
}
if (strcmp(arg, "--nthreads") == 0 && i+1 < argc) {
nthreads = atoll(argv[++i]);
continue;
}
if (strcmp(arg, "--usleep") == 0 && i+1 < argc) {
usleep_time = atol(argv[++i]);
continue;
}
return 1;
}
int r;
char cmd[256];
sprintf(cmd, "rm -rf %s", ENVDIR);
r = system(cmd); assert(r == 0);
r = toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r == 0);
DB_ENV *env = NULL;
r = db_env_create(&env, 0); assert(r == 0);
r = env->set_cachesize(env, 4, 0, 1); assert(r == 0);
r = env->open(env, ENVDIR, DB_PRIVATE + DB_THREAD + DB_CREATE + DB_INIT_TXN + DB_INIT_LOG + DB_INIT_MPOOL + DB_RECOVER, 0); assert(r == 0);
double tstart = now();
assert(nthreads > 0);
struct arg myargs[nthreads-1];
toku_pthread_t mytids[nthreads];
for (uint32_t i = 0; i < nthreads-1; i++) {
myargs[i] = (struct arg) { env, ntxns, usleep_time};
r = toku_pthread_create(&mytids[i], NULL, test_thread, &myargs[i]); assert(r == 0);
}
test_txn(env, ntxns, usleep_time);
for (uint32_t i = 0; i < nthreads-1; i++) {
void *ret;
r = toku_pthread_join(mytids[i], &ret); assert(r == 0);
}
double tend = now();
double t = tend-tstart;
double n = ntxns * nthreads;
printf("%f %f %f\n", n, t, (n/t)*1000000.0);
r = env->close(env, 0); assert(r == 0);
return 0;
}
This diff is collapsed.
install(
FILES
db-insert.c
db-insert-multiple.c
db-scan.c
db-update.c
db-insert.cc
db-insert-multiple.cc
db-scan.cc
db-update.cc
Makefile
README.examples
DESTINATION
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BACKGROUND_JOB_MANAGER_H
#define BACKGROUND_JOB_MANAGER_H
#ident "$Id$"
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
......
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BLOCK_ALLOCATOR_H
#define BLOCK_ALLOCATOR_H
#ident "$Id$"
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "fttypes.h"
#if defined(__cplusplus) || defined(__cilkplusplus)
extern "C" {
#endif
#define BLOCK_ALLOCATOR_ALIGNMENT 4096
// How much must be reserved at the beginning for the block?
......@@ -144,8 +141,5 @@ void block_allocator_merge_blockpairs_into (u_int64_t d, struct block_allo
// No blocks may overlap.
// Rationale: This is exposed so it can be tested by a glass box tester. Otherwise it would be static (file-scope) function inside block_allocator.c
#if defined(__cplusplus) || defined(__cilkplusplus)
};
#endif
#endif
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: expandtab:ts=8:sw=4:softtabstop=4:
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ifndef BLOCKTABLE_H
#define BLOCKTABLE_H
#ident "$Id$"
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "fttypes.h"
#if defined(__cplusplus) || defined(__cilkplusplus)
extern "C" {
#endif
typedef struct block_table *BLOCK_TABLE;
......@@ -85,9 +82,6 @@ enum {RESERVED_BLOCKNUM_NULL =0,
RESERVED_BLOCKNUM_DESCRIPTOR =2,
RESERVED_BLOCKNUMS};
#if defined(__cplusplus) || defined(__cilkplusplus)
};
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment