Commit 32e57a78 authored by Rich Prohaska's avatar Rich Prohaska

shorten the tests. addresses #198

git-svn-id: file:///svn/tokudb@1199 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9bd83f9f
......@@ -11,7 +11,7 @@ void parse_args (int argc, const char *argv[]) {
while (argc>1) {
int resultcode=0;
if (strcmp(argv[1], "-v")==0) {
verbose=1;
verbose++;
} else if (strcmp(argv[1], "-h")==0) {
do_usage:
fprintf(stderr, "Usage:\n%s [-v|-h]\n", argv0);
......
......@@ -332,11 +332,15 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
/* dup search */
#if USE_TDB
printf("%s:%d:WARNING:tokudb does not support DB_DUP\n", __FILE__, __LINE__);
#else
for (i = 1; i <= (1<<16); i *= 2) {
for (i = 1; i <= limit; i *= 2) {
test_ici_search(i, DB_DUP);
test_icdi_search(i, DB_DUP);
test_i0i1ci0_search(i, DB_DUP);
......@@ -344,14 +348,14 @@ int main(int argc, const char *argv[]) {
#endif
/* dupsort search */
for (i = 1; i <= (1<<16); i *= 2) {
for (i = 1; i <= limit; i *= 2) {
test_ici_search(i, DB_DUP + DB_DUPSORT);
test_icdi_search(i, DB_DUP + DB_DUPSORT);
test_i0i1ci0_search(i, DB_DUP + DB_DUPSORT);
}
/* insert data in descending order */
for (i = 1; i <= (1<<16); i *= 2) {
for (i = 1; i <= limit; i *= 2) {
test_reverse_search(i, 0);
#if USE_BDB
test_reverse_search(i, DB_DUP);
......
......@@ -156,7 +156,11 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
for (i=1; i<65537; i *= 2) {
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
for (i=1; i <= limit; i *= 2) {
test_dupsort_get(i, DB_DUP + DB_DUPSORT);
}
return 0;
......
......@@ -165,7 +165,11 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
for (i=1; i<65537; i *= 2) {
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
for (i=1; i <= limit; i *= 2) {
test_icdi_search(i, DB_DUP + DB_DUPSORT);
}
return 0;
......
......@@ -174,7 +174,11 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
for (i=1; i<65537; i *= 2) {
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
for (i=1; i <= limit; i *= 2) {
test_icdi_search(i, DB_DUP + DB_DUPSORT);
}
return 0;
......
......@@ -165,7 +165,11 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
for (i=1; i<65537; i *= 2) {
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
for (i=1; i <= limit; i *= 2) {
test_icdi_search(i, DB_DUP + DB_DUPSORT);
}
return 0;
......
......@@ -177,7 +177,11 @@ int main(int argc, const char *argv[]) {
system("rm -rf " DIR);
mkdir(DIR, 0777);
for (i=1; i<65537; i *= 2) {
int limit = 1<<13;
if (verbose > 1)
limit = 1<<16;
for (i = 1; i <= limit; i *= 2) {
test_icdi_search(i, DB_DUP + DB_DUPSORT);
}
return 0;
......
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