From 05ecf0a3742357a944a843bee78ce41762449015 Mon Sep 17 00:00:00 2001 From: ieQu1 <99872536+ieQu1@users.noreply.github.com> Date: Fri, 30 Jun 2023 14:53:54 +0200 Subject: [PATCH] fix: Don't assume shortnames --- doc/src/schema.adoc | 16 ++++++++++++++-- src/conf/emqttb_conf_model.erl | 2 -- src/framework/emqttb_app.erl | 2 +- src/scenarios/emqttb_scenario_sub.erl | 3 +-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/src/schema.adoc b/doc/src/schema.adoc index 88f4ef3..c082332 100644 --- a/doc/src/schema.adoc +++ b/doc/src/schema.adoc @@ -62,6 +62,18 @@ Autorate configuration can be referred by id. This scenario starts `-N` workers, which subscribe to a specified topic. The only mandatory parameter is `--topic`, which supports pattern substitutions. +[id=scenarios.sub._.parse_metadata] +== Extract metadata from message payloads + +Subscribers will report end-to-end latency when this option is enabled. + +WARNING: Publishers should insert metadata into the payloads. +For example, when using <> it's necessary to enable <> generation. + +WARNING: In order to measure latency accurately, the scenario should ensure that publishers reside on the same emqttb host with the subscribers. +Otherwise clock skew between different load generator instances will introduce a systematic error. + + === Client groups - `sub` @@ -219,13 +231,13 @@ Please note that throughput measurement is not reliable when the consume stage i [id=scenarios.persistent_session._.pub.qos] == QoS of the published messages -Warning: changing QoS to any value other then 2 is likely to cause consume stage to hang, +WARNING: changing QoS to any value other then 2 is likely to cause consume stage to hang, since it has to consume the exact number of messages as previously produced. [id=scenarios.persistent_session._.sub.qos] == Subscription QoS -Warning: changing QoS to any value other then 2 is likely to cause consume stage to hang, +WARNING: changing QoS to any value other then 2 is likely to cause consume stage to hang, since it has to consume the exact number of messages as previously produced. [id=groups] diff --git a/src/conf/emqttb_conf_model.erl b/src/conf/emqttb_conf_model.erl index a84203d..df6927a 100644 --- a/src/conf/emqttb_conf_model.erl +++ b/src/conf/emqttb_conf_model.erl @@ -23,8 +23,6 @@ -include("emqttb.hrl"). -include_lib("typerefl/include/types.hrl"). --import(lee_doc, [p/1, li/2]). - %%================================================================================ %% Type declarations %%================================================================================ diff --git a/src/framework/emqttb_app.erl b/src/framework/emqttb_app.erl index 588cc3f..6e70e9e 100644 --- a/src/framework/emqttb_app.erl +++ b/src/framework/emqttb_app.erl @@ -46,6 +46,6 @@ maybe_start_distr() -> ok; Name -> os:cmd("epmd -daemon"), - Opts = #{dist_listen => true, name_domain => shortnames}, + Opts = #{dist_listen => true}, net_kernel:start(Name, Opts) end. diff --git a/src/scenarios/emqttb_scenario_sub.erl b/src/scenarios/emqttb_scenario_sub.erl index 288ff65..750893e 100644 --- a/src/scenarios/emqttb_scenario_sub.erl +++ b/src/scenarios/emqttb_scenario_sub.erl @@ -93,8 +93,7 @@ model() -> }} , parse_metadata => {[value, cli_param], - #{ oneliner => "Extract metadata from message payloads" - , type => boolean() + #{ type => boolean() , default => false , cli_operand => "parse-metadata" }}