示例#1
0
/**
**building test tree end 
**/
int test_ram(void)
{

#ifdef WILDDOG_SELFTEST
        int res = 0;
        u8 tree_m=0, n=0;
        u8 request_num[4] = {1,WILDDOG_REQ_QUEUE_NUM/2,WILDDOG_REQ_QUEUE_NUM,WILDDOG_REQ_QUEUE_NUM * 2};
        u8 url[strlen(TEST_URL)+20];
#if 0
        if( (d_ramtree_num[TEST_TREE_ITEMS] + TEST_PROTO_COVER) > WILDDOG_PROTO_MAXSIZE )
        {
            printf("please modify WILDDOG_PROTO_MAXSIZE to %lu ,in wilddog_config.h \n",\
                (d_ramtree_num[TEST_TREE_ITEMS] + TEST_PROTO_COVER));
            return -1;
        }
 #endif       
        if( (res = test_buildtreeFunc() ) < 0 )
                return res;
        ramtest_titile_printf();
    
        for( tree_m=0; tree_m < TEST_TREE_ITEMS; tree_m++)
        {
            for( n=0; n <4; n++)
            {
                memset(url,0,sizeof(url));
                sprintf((char*)url,"%s%s",TEST_URL,p_ramtree_url[tree_m]);
                ramtest_handle(url,d_ramtree_num[tree_m],request_num[n]);
            }
        }
        ramtest_end_printf();
#endif
        return 0;

}
示例#2
0
void WD_SYSTEM
fake_main(void)
{
    if(!dns_flag)
    {
        gethost();      
    }
    else
    {
        test_buildtreeFunc(TEST_URL);
    }
}
**building test tree end 
**/

STATIC int test_perform(void)
{

#ifdef WILDDOG_SELFTEST
	int res = 0;
	u8 url[strlen(TEST_URL)+20];
  
	if( (res = test_buildtreeFunc() ) < 0 )
			return res;
	{
			u8 tree_m=0,n=0,d=0;	
			u8 request_num[4] = {1,16,32,64};
			u32 delay_tm[5] = {0,50,100,250,500};
				
			performtest_titile_printf();
			
			for(d=0; d<2; d++)
			{
				for(n=0; n<4; n++)
				{
					for(tree_m=0; tree_m< TEST_TREE_ITEMS; tree_m++)
					{

						
						
						memset(url,0,sizeof(url));
						sprintf((char*)url,"%s%s",TEST_URL,p_path[tree_m]);
						performtest_handle(delay_tm[d],url,\
							d_tree_num[tree_m],request_num[n]);

					}
				}
			}
			
			performtest_end_printf();
			return 0;
	}
#endif
	return 0;

}
示例#4
0
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
    }
}