`
mryufeng
  • 浏览: 977430 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

tsung inside

阅读更多
需要大规模测试的话 tsung的插件就很好用,写插件的时候需要知道多点tsung内部的信息.

OTP Supervision tree:
====================

The application is now split in two (see tsung-inside.png for an overview):

** a single controller (tsung_controller)

* ts_config_server (gen_server). Configuration server. Session's
   definitions are kept by the config server.

* ts_mon (gen_server). Each client send reports of stats to this
   server. Several types of messages are handled by ts_mon.

* ts_os_mon (gen_server). Use to monitor remote node activity (cpu,
   memory, network traffic). Currently, use an erlang agent on remote nodes.

* ts_timer  (used by ts_client when ack is global) (gen_fsm)

   servers used to construct messages:

* ts_msg_server (gen_server)
* ts_user_server (gen_server) used by jabber_* for unicity of users id

** several clients (tsung) Several nodes can be used simultaneously

This application is simpler:
 
* ts_launcher (gen_fsm) launch simulated users.

* ts_session_cache (gen_server) cache the sessions's definition (ask
   the config_server if it's not yet in the cache)

* 1 process per simultated client (ts_client), under
   the supervision of ts_clients_sup ( using simple_one_for_one )

Main modules:
============

   1/ ts_launcher. the master process that spawns other simulated clients:

   1.1/ client processes: at each simulated client correspond 1 erlang
        process (ts_client)

   1.2/ monitoring process (ts_mon)

   2/ statistical module (ts_stats)

   3/ protocol-specific modules (ts_jabber and ts_http, for
   example).

      tsung use different types of acknoledgements to determine
      when a the response of a request is over. For each requests, 4
      options are possible:

      * parse -> the receiving process parse the response from the
        server dans can warn the sending process when the response is
        finish (function parse/2). This is used for HTTP.

      * no_ack: as soon as the request has been sent, the next one is
        executed (it can be a thinktime)

      * local: the request is acknoledge once a packet is received

      * global: the request is acknoledge once all clients has
        received an acknoledgement. This has been introduced for
        Jabber: with that, you can set that users starts talking when
        everyone is connected.


How to add a new protocol, or extend an existing one:
====================================================

To add a new protocol, you have to create a module that implement and
exports:

-export([init_dynparams/0,
add_dynparams/4,
get_message/1,
session_defaults/0,
         parse/2,
         parse_config/2,
         new_session/0]).

There is a template file is doc/ts_template.erl


References:
==========

  - Erlang

  http://www.erlang.org/

  Design principles:
    http://www.erlang.org/doc/r7b/doc/design_principles/part_frame.html

  - Jabber

  http://docs.jabber.org/general/html/protocol.html

 
  - Stochastics models:

  For more details on stochastics models and application to Web
  workload generators, have a look at:

    Nicolas Niclausse. Mod閘isation, analyse de performance et
    dimensionnement du World Wide Web. Th鑣e de Doctorat (PhD), Universit�
    de Nice - Sophia Antipolis, Juin 1999.
    http://www-sop.inria.fr/mistral/personnel/Nicolas.Niclausse/these.html

Z. Liu, N. Niclausse, C. Jalpa-Villanueva & S. Barbier. Traffic
    Model and Performance Evaluation of Web Servers Rapport de
recherche INRIA, RR-3840 (http://www.inria.fr/rrrt/rr-3840.html)

内部的结构图在附件里面!

  • 大小: 23.3 KB
分享到:
评论

相关推荐

    tsung里面测试websocket的插件

    1. **安装Tsung**:首先确保系统已经安装了Tsung,如果没有,可以从官方仓库或通过包管理器进行安装。 2. **配置`websocket.xml`**:根据实际的WebSocket服务和测试需求,编辑配置文件。 3. **运行测试**:使用Tsung...

    tsung1.6.0

    **Tsung 1.6.0 - 开源多协议分布式负载测试工具** Tsung是一个功能强大的、基于Erlang编程语言开发的开源负载测试工具。它设计用于模拟大量用户并发访问,以测试网络服务和系统的性能及稳定性。Tsung不仅支持HTTP、...

    tsung+erlang包

    **Tsung + Erlang 包详解** Tsung 是一个开源的多协议负载和性能测试工具,它可以模拟大量用户并发访问服务器,从而评估系统的负载能力和稳定性。Tsung 的设计目标是提供一个灵活、可扩展的解决方案,能够测试各种...

    tsung测试总结

    ### TSUNG测试总结 #### 一、TSUNG概述 TSUNG是一款开源的负载与压力测试工具,主要用于评估系统的性能及稳定性。它支持多种协议,包括但不限于XMPP、HTTP、MySQL等,并且具备支持集群和高效运行的特点。由于其...

    tsung脚本及说明

    tsung的测试脚本,包含发送单人消息,群组消息,获取花名册等

    Openfire 3.9.3 Load Test Tsung配置xml

    Openfire 3.9.3 Load Test Tsung配置xml,10万用户下集群测试的Tsung压力测试工具的jabber_cluster.xml,session 5分钟

    MQTT压力测试之Tsung的使用

    MQTT压力测试之Tsung的使用 MQTT压力测试之Tsung的使用

    tsung最新用户手册

    Tsung是一款开源的压力测试工具,能够模拟多个用户对各种服务器应用进行压力测试。它使用Erlang语言编写,支持多种协议,如HTTP、WebDAV、SOAP、PostgreSQL、MySQL、LDAP和Jabber/XMPP。在实际使用中,Tsung可以模拟...

    Tsung负载测试tigase

    ### Tsung负载测试Tigase知识点详解 #### Tsung概述 Tsung是一款高效的压力测试工具,采用Erlang语言开发,能够支持多种网络协议,包括XMPP、HTTP、MySQL等。其独特的分布式特性使得它能够在单机环境下模拟大量...

    Tsung_测试XMPP_安装使用说明

    tsung是用erlang开发的一款简单易用的压力测试工具,目前仅支持linux各版本系统安装,有tar.gz和deb两种安装文件, 目前我们测试用的是CentOS或RedHat两种操作系统,因此选择tar.gz安装文件,总的来说tsung工具有...

    tsung高并发测试工具搭建(自己亲测,详细的一逼)

    tsung高并发测试工具搭建(自己亲测,详细的一逼),改文档是自己一步一步摸索出来的,主要是安装tsung整个过程很详细,搭过的人,知道tsung的搭建依赖很恶心,不是一时半会能搞出来的

    tsung安装使用说明

    ### Tsung 安装与使用详解 #### 一、Tsung 概述 Tsung 是一款基于 Erlang 开发的高性能压力测试工具,主要用于评估系统的并发处理能力。它支持多种协议,包括 HTTP、WebDAV、Jabber/XMPP、PostgreSQL、LDAP 和 ...

    tsung安装使用

    关于tsung工具的安装步骤以及使用过程中会遇到的常见问题解答

    tsung-1.3.3

    **Tsung 1.3.3:Linux环境下的强大压力测试工具** Tsung是一个高度可扩展、分布式的多协议负载和性能测试工具,专为模拟大量用户并发访问系统而设计。它支持多种网络协议,包括HTTP、HTTPS、FTP、TCP、UDP、jabber/...

    tsung-1.5.1.tar.gz

    【tsung-1.5.1.tar.gz】是一款开源的压力测试工具,专为评估系统在高负载下的性能和稳定性而设计。它具有广泛的应用场景,特别是在测试分布式系统,如即时通讯服务器Openfire时表现尤为出色。这个压缩包包含了Tsung...

    tsung安装相关文件

    —tsung-1.5.0.tar.gz —libtemplate-perl_2.20.orig.tar.gz —gnuplot-4.4.0.tar.gz —otp_src_R15B.tar.gz —perl-HTML-Tagset-3.10-2.1.1.noarch.rpm —perl-HTML-Parser-3.55-1.fc6.x86_64.rpm —...

    tigase及tsung安装笔记

    包括tigase的安装运行,tsung的安装运行,压测结果的信息解析等;

Global site tag (gtag.js) - Google Analytics