使用loadrunner录制winsock协议的程序(原创)

使用winsock协议录制,在回放的时候,响应时间会很慢。主要是因为录制时recv_buff接收的内容和回放时的内容不一致,系统会自动去检查。
解决办法:在程序中添加一个函数:lrs_set_recv_timeout2(0,0),这样系统就不去检查回收的内容是否一致了。
介绍两个函数:
1. lrs_set_recv_timeout(sec,microsec)
The function sets the period of time that Vugen waits to receive expected data from a socket.
默认值=10s

2. lrs_set_recv_timeout2(sec,microsec)
The function sets a timeout limit for receiving data on a socket。When lrs_receive receives the data buffer, it compares its size with the expected data. If the buffer size does not match, it performs additional iterations and rereads the incoming socket data, until the timeout2 limit is reached.



posted @ 2006-07-25 13:51  盈盈的工作小纸条  阅读(1681)  评论(4编辑  收藏  举报