feat: add http branch

This commit is contained in:
bookug 2017-05-16 21:16:40 +08:00
parent a72592e588
commit 3bca240151
4 changed files with 12 additions and 4 deletions

View File

@ -132,7 +132,8 @@ Join::judge(int _smallest, int _biggest)
//BETTER:how to guess the size of can_lists //BETTER:how to guess the size of can_lists
double size = (_smallest + _biggest) / 2.0; double size = (_smallest + _biggest) / 2.0;
double ans = Join::PARAM_DENSE * dense - size / Join::PARAM_SIZE; double ans = Join::PARAM_DENSE * dense - size / Join::PARAM_SIZE;
if (ans > Join::JUDGE_LIMIT) double limit = 1.0 / (double)Join::JUDGE_LIMIT;
if (ans > limit)
return 0; //multi_join method return 0; //multi_join method
else else
return 1; //index_join method return 1; //index_join method
@ -1229,6 +1230,8 @@ Join::multi_join()
for (int i = 0; i < start_size; ++i) for (int i = 0; i < start_size; ++i)
{ {
int ele = start_table.getID(i); int ele = start_table.getID(i);
//NOTICE: we can denote the total size here in vector, but no need because the variables' num is small
//(won't double to require more space)
RecordType record(1, ele); RecordType record(1, ele);
this->current_table.push_back(record); this->current_table.push_back(record);
//this->table_row_new.push_back(false); //this->table_row_new.push_back(false);

View File

@ -55,7 +55,7 @@ private:
static const unsigned PARAM_SIZE = 1000000; static const unsigned PARAM_SIZE = 1000000;
static const unsigned PARAM_PRE = 10000; static const unsigned PARAM_PRE = 10000;
static const unsigned PARAM_DENSE = 1; static const unsigned PARAM_DENSE = 1;
static const double JUDGE_LIMIT = 0.5; static const int JUDGE_LIMIT = 2;
static const int LIMIT_CANDIDATE_LIST_SIZE = 1000; static const int LIMIT_CANDIDATE_LIST_SIZE = 1000;
//BETTER?:predefine size to avoid copy cost //BETTER?:predefine size to avoid copy cost
TableType current_table; TableType current_table;

View File

@ -48,7 +48,7 @@ If you want to understand the details of the gStore system, or you want to try s
We have written a series of short essays addressing recurring challenges in using gStore to realize applications, which are placed in [Recipe Book](docs/TIPS.md). We have written a series of short essays addressing recurring challenges in using gStore to realize applications, which are placed in [Recipe Book](docs/TIPS.md).
You are welcome to report any advice or errors in the github Issues part of this repository, if not requiring in-time reply. However, if you want to urgent on us to deal with your reports, please email to <chenjiaqi93@163.com> to submit your suggestions and report bugs to us by emailing to <zengli-bookug@pku.edu.cn>. A full list of our whole team is in [Mailing List](docs/MAIL.md). You are welcome to report any advice or errors in the github Issues part of this repository, if not requiring in-time reply. However, if you want to urgent on us to deal with your reports, please email to <zengli@bookug.cc> to submit your suggestions and report bugs to us by emailing to <gStoreDB@gmail.com>. A full list of our whole team is in [Mailing List](docs/MAIL.md).
There are some restrictions when you use the current gStore project, you can see them on [Limit Description](docs/LIMIT.md). There are some restrictions when you use the current gStore project, you can see them on [Limit Description](docs/LIMIT.md).

View File

@ -23,6 +23,10 @@
#http://blog.csdn.net/cscrazybing/article/details/50789482 #http://blog.csdn.net/cscrazybing/article/details/50789482
#http://blog.163.com/liuhonggaono1@126/blog/static/10497901201210254622141/ #http://blog.163.com/liuhonggaono1@126/blog/static/10497901201210254622141/
#NOTICE: to debug the program, gdb and valgrind can be used
# objdump, nm and size command
#To analyse the performance, gprof and gcov/lcov can be used
#TODO:the dependences are not complete! #TODO:the dependences are not complete!
@ -35,7 +39,7 @@
#compile parameters #compile parameters
CC = ccache g++ CC = ccache g++ -std=c++11
#CC = g++ #CC = g++
#the optimazition level of gcc/g++ #the optimazition level of gcc/g++
@ -51,6 +55,7 @@ EXEFLAG = -g -pthread #-fprofile-arcs -ftest-coverage #-pg
#add -lreadline -ltermcap if using readline or objs contain readline #add -lreadline -ltermcap if using readline or objs contain readline
library = -ltermcap -lreadline -L./lib -lantlr -lgcov library = -ltermcap -lreadline -L./lib -lantlr -lgcov
library = -ltermcap -lreadline -L./lib -L/usr/local/lib/ -lantlr -lgcov -lboost_filesystem -lboost_system -lpthread
def64IO = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE def64IO = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
# paths # paths