一個簡單而強大的負載生成器:ponos

jopen 10年前發布 | 62K 次閱讀 ponos Erlang開發

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.
  • Task
    • A callback function of arity 0; the work to be performed in accordance with LoadSpec.
  • LoadSpec
    • The load specification defines the characteristic of the load. It is a function that maps time to intensity: fun(T) -> I where T is passed time in milliseconds and I 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.

項目主頁:http://www.baiduhome.net/lib/view/home/1416293344523

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!