void stab_test_cycle(void) { ramtest_init(1,1); printf("%s\n",STABTEST_URL); stab_titlePrint(); while(1) { stab_oneCrcuRequest(); stab_resultPrint(); } stab_endPrint(); }
void stab_test_cycle(void) { int i=0; ramtest_init(1,1); stab_titlePrint(); printf("%s\n",TEST_URL); //while(1) for(;i < 1; i++) { stab_oneCrcuRequest(); stab_resultPrint(); mico_thread_sleep(1); } stab_endPrint(); }
void stab_test_fullLoad(void) { int i; stab_titlePrint(); ramtest_init(1,1); /* mark star time*/ stab_set_runtime(); while(1) { /*Create an node which type is an object*/ for(i=0;i<10;i++) { stab_settest_dataInit(i); stab_settest_serialSet_send(); stab_settest_serialGet_send(); stab_resultPrint(); stab_settest_dataDeInit(); } } }
void WD_SYSTEM fake_main(void) { if(!dns_flag) { gethost(); } else { #if TEST_TYPE == TEST_STAB_CYCLE ramtest_init(1,1); stab_titlePrint(); printf("%s\n",TEST_URL); os_timer_disarm(&test_timer1); os_timer_setfn(&test_timer1, (os_timer_func_t *)stab_test_cycle, NULL); os_timer_arm(&test_timer1, 1000, 0); #else test_buildtreeFunc(TEST_URL); #endif } }
void ramtest_handle( u8 tree_num, u8 request_num) { u8 m = 0; Wilddog_T wilddog = 0; u8 url[64]={0}; ramtest_init(tree_num,request_num); sprintf((char*)url, "coaps://c_test.wilddogio.com/ramtest/tree_%d", tree2len[tree_num]); wilddog = wilddog_initWithUrl(url); if(0 == wilddog) { return; } count = 0; for(m=0; m < request_num; m++) { int res = wilddog_getValue(wilddog, test_onQueryFunc, NULL); if(0 == res) count++; else d_ramtest.d_sendfalt++; } ramtest_caculate_requestQueueRam(); while(1) { if(count == 0) { ramtest_printf(&d_ramtest); break; } ramtest_getAveragesize(); wilddog_trySync(); } wilddog_destroy(&wilddog); return;