#include #include #include #include #include "logstore.h" #include "datapage.cpp" #include "logiterators.cpp" #include "merger.h" #include #include #include #include #include #include #include #undef begin #undef end logserver *lserver=0; merge_scheduler *mscheduler=0; void terminate (int param) { printf ("Stopping server...\n"); lserver->stopserver(); delete lserver; printf("Stopping merge threads...\n"); mscheduler->shutdown(); delete mscheduler; printf("Deinitializing stasis...\n"); fflush(stdout); Tdeinit(); exit(0); } void insertProbeIter(int NUM_ENTRIES) { //signal handling void (*prev_fn)(int); prev_fn = signal (SIGINT,terminate); //if (prev_fn==SIG_IGN) //signal (SIGTERM,SIG_IGN); sync(); bufferManagerNonBlockingSlowHandleType = IO_HANDLE_PFILE; Tinit(); int xid = Tbegin(); mscheduler = new merge_scheduler; logtable ltable; int pcount = 40; ltable.set_fixed_page_count(pcount); recordid table_root = ltable.allocTable(xid); Tcommit(xid); int lindex = mscheduler->addlogtable(<able); ltable.setMergeData(mscheduler->getMergeData(lindex)); mscheduler->startlogtable(lindex); lserver = new logserver(10, 32432); lserver->startserver(<able); // Tdeinit(); } /** @test */ int main() { //insertProbeIter(25000); insertProbeIter(10000); /* insertProbeIter(5000); insertProbeIter(2500); insertProbeIter(1000); insertProbeIter(500); insertProbeIter(1000); insertProbeIter(100); insertProbeIter(10); */ return 0; }