|
压力测试--vu脚本
如果使用数据池,模拟10个用户兵法,失败,报License不对;
如果无datapool,模拟10个用户,可以用运行,License无错
非常急,麻烦看看
#include <VU.h>
#include <sme/data.h>
{
string GroupId;
string OwnerName;
oracle=sqlconnect("","bboss","bboss","shyzflcp","oracle8.1");
set Server_connection = oracle;
/* emulation functions */
DP1 = datapool_open("testdataconnect");
datapool_fetch(DP1);
sqlexec ["test_gr003"]
"select group_id, owner_name from group_info where group_id ="
+datapool_value(DP1, "groupId");
sqlnrecv ["test_gr004"] ALL_ROWS;
SaveData ("tmp_results");
OwnerName = GetData("tmp_results", 1,2);
FreeData ("tmp_results");
//print data
print "user id:", _uid;
print "\n", "groupId=";
print "\n", datapool_value(DP1, "groupId");
print "\n", OwnerName;
print "------------------------------------------------------------------------------------------";
//print data end
sqldisconnect (oracle);
}
DATAPOOL_CONFIG "testdataconnect" DP_SEQUENTIAL DP_SHARED DP_PERSISTENT DP_WRAP
{
INCLUDE, "OwnerName", "string", "abcef";
INCLUDE, "groupId", "string", "2100000304";
} |
|