test(ds): Attempt to stabilize metrics_worker tests in CI
This commit is contained in:
parent
4382971443
commit
ae5935e7f7
|
@ -221,7 +221,6 @@ do_flush(
|
|||
emqx_ds_builtin_metrics:inc_egress_batches(Metrics),
|
||||
emqx_ds_builtin_metrics:inc_egress_messages(Metrics, S#s.n),
|
||||
emqx_ds_builtin_metrics:inc_egress_bytes(Metrics, S#s.n_bytes),
|
||||
lists:foreach(fun(From) -> gen_server:reply(From, ok) end, Replies),
|
||||
?tp(
|
||||
emqx_ds_replication_layer_egress_flush,
|
||||
#{db => DB, shard => Shard, batch => Messages}
|
||||
|
|
|
@ -64,10 +64,11 @@ consume(DB, TopicFilter) ->
|
|||
|
||||
consume(DB, TopicFilter, StartTime) ->
|
||||
lists:flatmap(
|
||||
fun({_Stream, Msgs}) ->
|
||||
Msgs
|
||||
end,
|
||||
consume_per_stream(DB, TopicFilter, StartTime)).
|
||||
fun({_Stream, Msgs}) ->
|
||||
Msgs
|
||||
end,
|
||||
consume_per_stream(DB, TopicFilter, StartTime)
|
||||
).
|
||||
|
||||
consume_per_stream(DB, TopicFilter, StartTime) ->
|
||||
Streams = emqx_ds:get_streams(DB, TopicFilter, StartTime),
|
||||
|
|
|
@ -31,18 +31,17 @@ suite() ->
|
|||
-define(NAME, ?MODULE).
|
||||
|
||||
init_per_suite(Config) ->
|
||||
{ok, _} = emqx_metrics_worker:start_link(?NAME),
|
||||
Config.
|
||||
|
||||
end_per_suite(_Config) ->
|
||||
ok = emqx_metrics_worker:stop(?NAME).
|
||||
ok.
|
||||
|
||||
init_per_testcase(_, Config) ->
|
||||
ok = emqx_metrics_worker:stop(?NAME),
|
||||
{ok, _} = emqx_metrics_worker:start_link(?NAME),
|
||||
Config.
|
||||
|
||||
end_per_testcase(_, _Config) ->
|
||||
ok = emqx_metrics_worker:stop(?NAME),
|
||||
ok.
|
||||
|
||||
t_get_metrics(_) ->
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
Added metrics related to EMQX durable storage to Prometheus.
|
||||
|
||||
New metrics:
|
||||
|
||||
- `emqx_ds_egress_batches`
|
||||
|
||||
- `emqx_ds_egress_batches_retry`
|
||||
|
||||
- `emqx_ds_egress_batches_failed`
|
||||
|
||||
- `emqx_ds_egress_messages`
|
||||
|
||||
- `emqx_ds_egress_bytes`
|
||||
|
||||
- `emqx_ds_egress_flush_time`
|
||||
|
||||
- `emqx_ds_store_batch_time`
|
||||
|
||||
- `emqx_ds_builtin_next_time`
|
||||
|
||||
- `emqx_ds_storage_bitfield_lts_counter_seek`
|
||||
|
||||
- `emqx_ds_storage_bitfield_lts_counter_next`
|
||||
|
||||
- `emqx_ds_storage_bitfield_lts_counter_collision`
|
||||
|
||||
Note: these metrics are only visible when session persistence is enabled.
|
||||
|
||||
Number of persisted messages has been also added to the dashboard.
|
Loading…
Reference in New Issue