Skip to content

Commit

Permalink
Merge pull request #202 from qzhuyan/dev/william/json-payload-template
Browse files Browse the repository at this point in the history
support json payload template
  • Loading branch information
qzhuyan authored Sep 19, 2024
2 parents d0ed374 + fb45cab commit af66a6b
Show file tree
Hide file tree
Showing 6 changed files with 314 additions and 34 deletions.
5 changes: 3 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

{deps, [
{getopt, {git, "https://github.com/zmstone/getopt", {tag, "v1.0.2.1"}}},
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.11.0"}}},
{emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.13.1"}}},
{prometheus, {git, "https://github.com/emqx/prometheus.erl", {tag, "v4.10.0.2"}}},
{cowboy, "2.9.0"}
{cowboy, "2.9.0"},
{jsx, "3.1.0"}
]}.

{escript_name, emqtt_bench}.
Expand Down
13 changes: 6 additions & 7 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IsWin32 = fun() ->
win32 =:= element(1, os:type())
end,

Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.114"}}},
Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.504"}}},

IsQuicSupp = not (IsCentos6() orelse IsWin32() orelse
false =/= os:getenv("BUILD_WITHOUT_QUIC")
Expand All @@ -25,6 +25,7 @@ Profiles = {profiles,[ {escript, []}
, getopt
, cowboy
, prometheus
, jsx
| [ quicer || IsQuicSupp ]
] }
, {overlay_vars_values, [ {runner_root_dir, "$(cd $(dirname $(readlink $0 || echo $0))/..; pwd -P)"}
Expand All @@ -34,6 +35,7 @@ Profiles = {profiles,[ {escript, []}
, {mkdir, "escript"}
, {copy, "_build/emqtt_bench/bin", "escript"}
, {copy, "bin/emqtt_bench","bin/emqtt_bench"}
, {copy, "topic_spec.json", "topic_spec.json"}
, {template,"bin/emqtt_bench","bin/emqtt_bench"}
]}
, {tar_hooks, [ "scripts/macos-sign-binaries.sh",
Expand All @@ -56,12 +58,9 @@ ExtraDeps = fun(C) ->
lists:keystore(deps, 1, C, {deps, Deps})
end,

NewConfig = [ {escript_incl_apps,
[emqtt_bench,
prometheus,
quantile_estimator,
cowboy
| [ quicer || IsQuicSupp ]
NewConfig = [ {escript_incl_apps,
[emqtt_bench |
[ quicer || IsQuicSupp ]
]}
, Profiles
| ExtraDeps(CONFIG)],
Expand Down
12 changes: 11 additions & 1 deletion src/emqtt_bench.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
{description, "Erlang MQTT v5.0 Benchmark Tool"},
{vsn, git},
{registered, []},
{applications, [kernel, stdlib, emqtt, getopt, gun, cowlib]},
{applications, [kernel,
stdlib,
emqtt,
getopt,
gun,
cowlib,
jsx,
prometheus,
quantile_estimator,
cowboy
]},
{included_applications, [cowboy, prometheus]},
{env, []},
{maintainers,["Feng Lee <[email protected]>"]},
Expand Down
Loading

0 comments on commit af66a6b

Please sign in to comment.