dragon-pk 发表于 2008-8-1 15:20:33

vlc流媒体压力测试的问题?

录制了脚本文件,action内容参考前人的修改为:
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Wed Jul 30 10:05:49
*********************************************************************/

#include "lrs.h"


Action()
{   
   
    lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=192.168.0.58:554",LrsLastArg);

    lrs_send("socket0", "buf0", LrsLastArg);

    lrs_receive("socket0", "buf1", LrsLastArg);

    lrs_send("socket0", "buf2", LrsLastArg);

    lrs_receive("socket0", "buf3", LrsLastArg);

    lrs_create_socket("socket1", "UDP", "LocalHost={NewParam}",LrsLastArg);

    lrs_send("socket1", "buf4", "TargetSocket=reserved-multicast-range-NOT-delegated.example.com:15947", LrsLastArg);

    lrs_receive("socket1", "buf5", LrsLastArg);

    lrs_close_socket("socket1");

    lrs_send("socket0", "buf6", LrsLastArg);

    lrs_receive("socket0", "buf7", LrsLastArg);

    lrs_save_param("socket0",NULL,"newsession",133,19);

    lr_output_message ("param1: %s", lr_eval_string("<newsession>"));

    lrs_send("socket0", "buf8", LrsLastArg);

    lrs_create_socket("socket2", "UDP", "LocalHost=0",LrsLastArg);

    lrs_receive("socket0", "buf9", LrsLastArg);

    lrs_receive("socket2", "buf10", LrsLastArg);

    lrs_create_socket("socket3", "UDP", "LocalHost={NewParam_1}",LrsLastArg);

    lrs_send("socket3", "buf11", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf12", LrsLastArg);

    lrs_send("socket3", "buf13", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf14", LrsLastArg);

    lrs_send("socket3", "buf15", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf16", LrsLastArg);

    lrs_send("socket3", "buf17", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf18", LrsLastArg);

    lrs_send("socket3", "buf19", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf20", LrsLastArg);

    lrs_send("socket3", "buf21", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf22", LrsLastArg);

    lrs_send("socket3", "buf23", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf24", LrsLastArg);

    lrs_send("socket3", "buf25", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf26", LrsLastArg);

    lrs_send("socket3", "buf27", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf28", LrsLastArg);

    lrs_send("socket3", "buf29", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf30", LrsLastArg);

    lrs_send("socket3", "buf31", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf32", LrsLastArg);

    lrs_send("socket3", "buf33", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf34", LrsLastArg);

    lrs_send("socket3", "buf35", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf36", LrsLastArg);

    lrs_send("socket3", "buf37", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf38", LrsLastArg);

    lrs_send("socket3", "buf39", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf40", LrsLastArg);

    lrs_send("socket3", "buf41", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf42", LrsLastArg);

    lrs_send("socket3", "buf43", "TargetSocket=192.168.0.58:1", LrsLastArg);

    lrs_receive("socket2", "buf44", LrsLastArg);
    lrs_disable_socket("socket0", DISABLE_SEND);

    lrs_close_socket("socket2");
    lrs_close_socket("socket3");
    lrs_close_socket("socket0");

    return 0;
}

,此时我把data.ws里面的session id全部替换成了<newsession>,当user=1可以pass不过在linux后台我通过命令看不到新增加的线程数,但是在程序里可以看到已经模拟向服务器发送了setup、play请求,那为什么没有增加输入线程呢?socket1socket3已经将localhost参数化了,参数化后我可以增加users,但是后台程序里面的cesq老是4,应该如何修改才能做到正确并发呢?我参考了论坛里有篇关于达尔文测试的文章,文章地址是:http://bbs.51testing.com/viewthread.php?tid=23525&page=1&authorid=14711
我不明白为什么它当中buf8中是sendplay的信息呢?我的对应的buf10在data.ws里面怎么是乱码?我data.ws的内容是:
;WSRData 2 1

send buf0 128
        "OPTIONS rtsp://192.168.0.58:554/sh.mpg RTSP/1.0\r\n"
        "CSeq: 1\r\n"
        "User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)\r\n"
        "\r\n"

recv buf1 115
        "RTSP/1.0 200 Ok\r\n"
        "Cseq: 1\r\n"
        "Server: VLC Server\r\n"
        "Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE\r\n"
        "Content-Length: 0\r\n"
        "\r\n"

send buf2 154
        "DESCRIBE rtsp://192.168.0.58:554/sh.mpg RTSP/1.0\r\n"
        "CSeq: 2\r\n"
        "Accept: application/sdp\r\n"
        "User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)\r\n"
        "\r\n"

recv buf3 339
        "RTSP/1.0 200 OK\r\n"
        "Content-type: application/sdp\r\n"
        "Server: VLC Server\r\n"
        "Content-Length: 214\r\n"
        "Cseq: 2\r\n"
        "Cache-Control: no-cache\r\n"
        "\r\n"
        "v=0\r\n"
        "o=- 1217380334398509 2 IN IP4 192.168.0.58\r\n"
        "c=IN IP4 0.0.0.0\r\n"
        "t=0 0\r\n"
        "a=tool:vlc 0.8.6c\r\n"
        "a=range:npt=0-206.889\r\n"
        "m=video 0 RTP/AVP 33\r\n"
        "a=rtpmap:33 MP2T/90000\r\n"
        "a=control:rtsp://192.168.0.58:554/sh.mpg/trackID=0\r\n"

send buf4 11
        "hostIdTest"
        "\x00"

recv buf5 11
        "hostIdTest"
        "\x00"

send buf6 186
        "SETUP rtsp://192.168.0.58:554/sh.mpg/trackID=0 RTSP/1.0\r\n"
        "CSeq: 3\r\n"
        "Transport: RTP/AVP;unicast;client_port=1462-1463\r\n"
        "User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)\r\n"
        "\r\n"

recv buf7 161
        "RTSP/1.0 200 OK\r\n"
        "Transport: RTP/AVP/UDP;client_port=1462-1463\r\n"
        "Server: VLC Server\r\n"
        "Content-Length: 0\r\n"
        "Cseq: 3\r\n"
        "Cache-Control: no-cache\r\n"
        "Session: <newsession>\r\n"
        "\r\n"

send buf8 167
        "PLAY rtsp://192.168.0.58:554/sh.mpg RTSP/1.0\r\n"
        "CSeq: 4\r\n"
        "Session: <newsession>\r\n"
        "Range: npt=0.000-\r\n"
        "User-Agent: VLC media player (LIVE555 Streaming Media v2007.02.20)\r\n"
        "\r\n"

recv buf9 125
        "RTSP/1.0 200 OK\r\n"
        "Server: VLC Server\r\n"
        "Content-Length: 0\r\n"
        "Cseq: 4\r\n"
        "Cache-Control: no-cache\r\n"
        "Session: <newsession>;timeout=5\r\n"
        "\r\n"
recv buf10 38512
        "\x80"
        " "
        "\x07\xb0\x11"
        "鱭繆G@"
        "\x00"
        "0"
..................都是乱码.....
急切的恳请帮助

[ 本帖最后由 dragon-pk 于 2008-8-1 15:25 编辑 ]

dragon-pk 发表于 2008-8-1 17:21:34

没人接触这些吗?难道

jetqu 发表于 2012-4-24 14:26:51

最近才搞的,你的这个用WINSOCKET做的测试?
页: [1]
查看完整版本: vlc流媒体压力测试的问题?