我必须为我们的移动客户端(基于聊天)执行"简单XMPP"与"XMPP over BOSH"的比较.我想使用相同的工具来比较两者.我在互联网上搜索并找到了一个名为tsung的工具,它支持HTTP和XMPP.我已经设置并能够使用给定的示例脚本为XMPP运行tsung.
现在问题是我无法为"XMPP over BOSH"编写Tsung xml脚本.我尝试在互联网上搜索但找不到任何东西.
有人可以指导我为"XMPP over BOSH"设置Tsung吗?
如果有一个除了Tsung之外的工具可以满足我的目的,请告诉我.
我正在使用Tsung从另一台机器上测试CouchDB服务器,并且需要建立安全连接.不幸的是,我无法在文档或在线中找到语法示例...
任何帮助将不胜感激!
我试图创建负载测试场景ejabberd用tsung。
我想模拟来自数千个客户端的数千个XMPP事件。根据tsung的手册,我可以使用for循环创建重复的动作:
<for from="1" to="10" incr="1" var="counter">
[...]
<request> <http url="/page?id=%%_counter%%"></http> </request>
[...]
</for>
Run Code Online (Sandbox Code Playgroud)
但是这个例子对我不起作用:
alex@alex:~/.tsung$ tsung -f jabber.xml start
Starting Tsung
"Log directory is: /home/alex/.tsung/log/20130417-1404"
3306- fatal: {error,{validity_constraint_Name_Token,37}}
Config Error, aborting ! {fatal,{{error,{validity_constraint_Name_Token,37}},
{file,"jabber.xml"},
{line,10},
{col,29}}}
Run Code Online (Sandbox Code Playgroud)
完整的配置文件:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.5">
<clients>
<client host="localhost" use_controller_vm="true"></client>
</clients>
<!-- Server side setup -->
<servers>
<for from="1" to="1000" incr="1" var="counter">
<server host="t%%_counter%%.testserver.org" port="5222" type="tcp"></server>
</for>
</servers>
<load>
<arrivalphase phase="1" …Run Code Online (Sandbox Code Playgroud) 我一直试图让tsung连接到我运行kubuntu 12.04的盒子
这是我的配置的客户端部分
<clients>
<client host="klaptop" weight="1" maxusers="500"/>
</clients>
Run Code Online (Sandbox Code Playgroud)
我使用以下命令运行tsung
tsung -f /var/tsung/xml/config.xml -l /var/tsung/logs/ start
Run Code Online (Sandbox Code Playgroud)
我在tsung_controller日志文件中收到以下错误
=INFO REPORT==== 20-Jun-2012::15:06:01 ===
ts_config_server:(0:<0.72.0>) Can't start newbeam on host klaptop (reason: timeout) ! Aborting!
Run Code Online (Sandbox Code Playgroud)
我已经阅读了手册的故障排除并试图确保我的所有基础都被覆盖(相同的erlang版本,ssh连接无密码,主机名设置正确等)
我已经确认了他们给出的示例的连接,这是我的结果.
[/var/tsung]$ erl -rsh ssh -sname foo -setcookie mycookie
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
(foo@macbook)1> slave:start(klaptop,bar,"-setcookie mycookie").
{ok,bar@klaptop}
Run Code Online (Sandbox Code Playgroud)
用户手册似乎假设一旦连接在erlang中运行,tsung也会工作,但对我来说情况并非如此,我仍然遇到相同的超时问题.
我不知道如何进一步调试这个,任何帮助或建议将不胜感激.
更新:根据评论中的要求,我尝试使用IP.使用以下配置
<client host="klaptop" weight="1" maxusers="500">
<ip value="10.160.1.89"></ip>
</client>
Run Code Online (Sandbox Code Playgroud)
我虽然得到了同样的错误.
JMeter和Tsung有什么区别?我读到,如果使用相同的硬件进行测试,Tsung可能比JMeter产生更多的负载,但是它与现实有多接近?
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true"></client>
</clients>
<servers>
<server host="localhost" port="5222" type="tcp"></server>
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="minute">
<users maxnumber="100" interarrival="5" unit="second"></users>
</arrivalphase>
</load>
<options>
<option type="ts_jabber" name="global_number" value="100"></option>
<option type="ts_jabber" name="userid_max" value="100"></option>
<option type="ts_jabber" name="domain" value="localhost"></option>
<option type="ts_jabber" name="username" value="ram"></option>
<option type="ts_jabber" name="passwd" value="ram123"></option>
</options>
<sessions>
<session probability="100" name="jabber-example" type="ts_jabber">
<request> <jabber type="connect" ack="no_ack"></jabber> </request>
<thinktime value="2"></thinktime>
<transaction name="authenticate">
<request> <jabber type="auth_get" ack="global"></jabber></request>
<request> <jabber type="auth_set_plain" ack="local"></jabber></request>
</transaction>
<request>
<jabber type="presence:initial" ack="no_ack"></jabber></request> …Run Code Online (Sandbox Code Playgroud) 我是tsung性能测试的新手.我使用brew在Mac OS X中安装了Tsung .经过多次尝试和解决其他一些问题后,我对以下错误感到震惊,我在其他地方找不到合适的解决方案.
我面临以下错误:
"单个虚拟机中达到的最大并发用户数和'use_controller_vm'为真,无法启动新射频!!!检查配置中的'maxusers'值.~n"
我以前运行的命令是:
tsung -f test_performance.xml start -r ssh_no_check
其中ssh_no_check是:
#!/bin/sh
/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $@
Run Code Online (Sandbox Code Playgroud)
和test_performance.xml是:
<?xml version="2.0"?>
<!DOCTYPE tsung SYSTEM "/path_to_tsung/tsung-1.0.dtd">
<tsung loglevel="warning">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="100"/>
</clients>
<servers>
<server host="server_ip" port="port_num" type="tcp"/>
</servers>
<load>
<arrivalphase phase="1" duration="60" unit="second">
<users arrivalrate="300" unit="second"/>
</arrivalphase>
</load>
<sessions>
<session name="es_load" weight="1" type="ts_http">
<transaction name="transaction_name">
<request>
<http url="url_path" contents="request_body" content_type="application/json" method="POST">
<http_header name="header0" value="value0"/>
<http_header name="header1" value="value2"/>
</http>
</request>
</transaction> …Run Code Online (Sandbox Code Playgroud) tsung ×7
load-testing ×4
benchmarking ×1
ejabberd ×1
erlang ×1
https ×1
jmeter ×1
ssl ×1
xmpp ×1