|
5#
楼主 |
发表于 2010-3-17 17:06:47
|
只看该作者
#include "web_api.h"
#define STR_LEN 3500
char str[STR_LEN];
int array[51];
Action()
{
int i,m,l;
srand( (unsigned)time( NULL ) );
m = rand()%30+21;
for (i = 0; i < m; i++)
{
l =(rand()%450 + 1)*(rand()%449 + 1);
array[ i ] = l;
}
str[0]='\0';
for (i = 0; i < m ; i++)
{
if (i==0)
sprintf(str,"%d",array);
else
sprintf(str,"%s,%d",str,array);
}
lr_save_string( str, "UserID");
web_url("replies_summary_multi",
"URL=http://10.8.8.34:27000/notes/replies_summary_multi?note_ids={UserID}&viewer_id={ViewID}",
"Resource=1",
"RecContentType=application/json",
"Referer=",
LAST);
return 0;
按照您的建议采用srand( (unsigned)time( NULL ) )方式后问题依旧,参数UserID为Group Name,上面是action所有代码。在controller中设置4并发执行一次后后台日志如下:
2010-03-17 16:56:29:765 DEBUG http-0.0.0.0-27000-20 InvokeLogger - REQ 10.8.16.50 /notes/replies_summary_multi {note_ids=38220,18060,16880,12644,43230,48006,51604,143856,67860,99008,58940,87780,19084,39676,64605,2385,20020,21440,4905,7245,57616,37323,21996,79200,108703,24929,10450,37014,26226,9048,68105,25472,11144,105244,12994,69344,65600,135228,35156,24070,4394,20470,25130, viewer_id=18321}
2010-03-17 16:56:29:766 DEBUG http-0.0.0.0-27000-17 InvokeLogger - REQ 10.8.16.50 /notes/replies_summary_multi {note_ids=38220,18060,16880,12644,43230,48006,51604,143856,67860,99008,58940,87780,19084,39676,64605,2385,20020,21440,4905,7245,57616,37323,21996,79200,108703,24929,10450,37014,26226,9048,68105,25472,11144,105244,12994,69344,65600,135228,35156,24070,4394,20470,25130, viewer_id=227344}
2010-03-17 16:56:29:766 DEBUG http-0.0.0.0-27000-33 InvokeLogger - REQ 10.8.16.50 /notes/replies_summary_multi {note_ids=38220,18060,16880,12644,43230,48006,51604,143856,67860,99008,58940,87780,19084,39676,64605,2385,20020,21440,4905,7245,57616,37323,21996,79200,108703,24929,10450,37014,26226,9048,68105,25472,11144,105244,12994,69344,65600,135228,35156,24070,4394,20470,25130, viewer_id=292735}
2010-03-17 16:56:29:768 DEBUG http-0.0.0.0-27000-26 InvokeLogger - REQ 10.8.16.50 /notes/replies_summary_multi {note_ids=38220,18060,16880,12644,43230,48006,51604,143856,67860,99008,58940,87780,19084,39676,64605,2385,20020,21440,4905,7245,57616,37323,21996,79200,108703,24929,10450,37014,26226,9048,68105,25472,11144,105244,12994,69344,65600,135228,35156,24070,4394,20470,25130, viewer_id=332978} |
|