一个简单而强大的负载生成器:ponos
Ponos是一个简单但功能强大的Erlang应用,用于生成频率可配置的负载。它的设计是轻量级的,简单的使用,并要求最低配置。
Quick Start Guide
$> git clone https://github.com/klarna/ponos.git $> cd ponos $> make $> erl -pa ebin -s ponos 1> Args = [ {name, unique_name_of_type_atom} 1> , {task, fun() -> ok end} 1> , {load_spec, ponos_load_specs:make_constant(10.0)} 1> ]. 2> ponos:add_load_generators([Args]). 3> ponos:init_load_generators(). 4> application:stop(ponos).
负载生成器Load Generators
一个负载生成器只有三个部分:
Name
- A unique identifier (of type
atom()
) used to reference the load generator.
- A unique identifier (of type
Task
- A callback function of arity 0; the work to be performed in accordance with
LoadSpec
. </ul> </li> LoadSpec
- The load specification defines the characteristic of the load. It is a function that maps time to intensity:
fun(T) -> I
whereT
is passed time in milliseconds andI
is the intensity expressed as calls per second. The user may define its own specification, but ponos provides typical load patterns such as constant load, bursts, staircase, and sawtooth. Seeponos_load_specs
for a full list of load specifications. </ul> </li> </ul>
- The load specification defines the characteristic of the load. It is a function that maps time to intensity:
- A callback function of arity 0; the work to be performed in accordance with
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!