#define _NANXING_TEST_ #define _RANDOM_LIST_ #define NANXING_DEBUG_ #include"../extend/skiplist.h" #include"time.h" void test_insert(int roll,int key_type,int level,bool control) //roll代表插入次数,key_type代表给出的key的随机数总数,control代表是否启用init { nanxing_extend::skipList test{level}; int random[key_type]; if(control==1) { test.create_random_list(); //启用内部随机数表 } std::mt19937 rnd(std::chrono::system_clock::now().time_since_epoch().count()); for(auto& i:random) { i=static_cast(rnd()); } std::chrono::high_resolution_clock::time_point tp1 = std::chrono::high_resolution_clock::now(); for(int i=0;i fun{std::bind(test_insert,2000000,10240,15,false)}; nanxing_test::time_test(fun); }