Files
EventHubBack/test/tsung/eventhub_ift_stress_hold_beams.xml
aleksey 4327de486f
CI / test (push) Successful in 16m25s
CI / deploy-ift (push) Successful in 5m49s
CI / e2e-ift (push) Failing after 4m38s
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped
fix(mnesia): apply dump_log_write_threshold before mnesia start.
change_config rejected the key; set_env + verify enables the IFT ceiling ladder. Refs EventHub/EventHubBack#30 Refs EventHub/EventHubBack#34

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 19:22:32 +03:00

143 lines
6.8 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<!--
IFT controlled hold + slave beams: дойти до фаз 0.05/0.035.
use_controller_vm=false — новые beam при заполнении maxusers (не hard-stop).
Пул: ift-users.csv. Mix browse 70% / write 30%.
maxusers=100; ladder 0.2→0.1→0.05→0.035; thinktime=1s.
Критерий 2A: error >1% ИЛИ mean >500 ms.
Риск: выше нагрузка на дев-генератор; не uncapped bump.
-->
<tsung loglevel="notice" version="1.0">
<clients>
<client host="localhost" use_controller_vm="false" maxusers="100" cpu="2"/>
</clients>
<servers>
<server host="api.ift.eventhub.local" port="443" type="ssl"/>
</servers>
<load>
<arrivalphase phase="1" duration="2" unit="minute">
<users interarrival="0.2" unit="second"/>
</arrivalphase>
<arrivalphase phase="2" duration="2" unit="minute">
<users interarrival="0.1" unit="second"/>
</arrivalphase>
<arrivalphase phase="3" duration="3" unit="minute">
<users interarrival="0.05" unit="second"/>
</arrivalphase>
<arrivalphase phase="4" duration="3" unit="minute">
<users interarrival="0.035" unit="second"/>
</arrivalphase>
</load>
<options>
<option name="ssl_reuse" value="true"/>
<option name="file_server" id="usercred" value="test/tsung/ift-users.csv"/>
</options>
<sessions>
<session name="browse" probability="70" type="ts_http">
<setdynvars sourcetype="file" fileid="usercred" delimiter=";" order="iter">
<var name="user_email"/>
<var name="user_password"/>
</setdynvars>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<dyn_variable name="token" re="&quot;token&quot;\s*:\s*&quot;([^&quot;]+)"/>
<http url="https://api.ift.eventhub.local/v1/login" method="POST" version="1.1"
content_type="application/json"
contents='{"email":"%%_user_email%%","password":"%%_user_password%%"}'/>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/user/me" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/calendars" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="log" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/search?q=lt" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="log" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/user/bookings" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
</session>
<session name="write" probability="30" type="ts_http">
<setdynvars sourcetype="file" fileid="usercred" delimiter=";" order="iter">
<var name="user_email"/>
<var name="user_password"/>
</setdynvars>
<setdynvars sourcetype="random_number" start="100000" end="9999999">
<var name="rand_id"/>
</setdynvars>
<setdynvars sourcetype="random_number" start="10" end="28">
<var name="day"/>
</setdynvars>
<setdynvars sourcetype="random_number" start="10" end="59">
<var name="sec"/>
</setdynvars>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<dyn_variable name="token" re="&quot;token&quot;\s*:\s*&quot;([^&quot;]+)"/>
<http url="https://api.ift.eventhub.local/v1/login" method="POST" version="1.1"
content_type="application/json"
contents='{"email":"%%_user_email%%","password":"%%_user_password%%"}'/>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<dyn_variable name="calendar_id" re="&quot;id&quot;\s*:\s*&quot;([^&quot;]+)"/>
<http url="https://api.ift.eventhub.local/v1/calendars" method="POST" version="1.1"
content_type="application/json"
contents='{"title":"Stress Cal %%_rand_id%%","confirmation":"auto"}'>
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<dyn_variable name="event_id" re="&quot;id&quot;\s*:\s*&quot;([^&quot;]+)"/>
<http url="https://api.ift.eventhub.local/v1/calendars/%%_calendar_id%%/events" method="POST"
version="1.1" content_type="application/json"
contents='{"title":"Stress Ev %%_rand_id%%","start_time":"2032-08-%%_day%%T14:00:%%_sec%%Z","duration":30,"capacity":20}'>
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="abort" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/events/%%_event_id%%" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
<thinktime value="1"/>
<request subst="true">
<match do="log" when="nomatch">HTTP/[0-9.]+ 20</match>
<http url="https://api.ift.eventhub.local/v1/calendars" method="GET" version="1.1">
<http_header name="Authorization" value="Bearer %%_token%%"/>
</http>
</request>
</session>
</sessions>
</tsung>