mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

The overload-drop.zeek and overload-no-drop.zeek tests have proxy, worker-1 and worker-2 publish to the manager topic. For the drop case, we verify that both, the senders, but also the manager drops events. For the no-drop test, the HWMs are set such that all events are buffered. The overload-worker-proxy-topic*.zeek tests are similar, but instead of publishing to the manager topic, proxy, worker-1 and worker-2 publish to the proxy and worker topics to overload each other. This had previously resulted in lockups and these tests verify that this doesn't happen anymore.
20 lines
515 B
Text
20 lines
515 B
Text
module Cluster::Backend::ZeroMQ;
|
|
|
|
export {
|
|
global xpub_drops: function(): count;
|
|
global onloop_drops: function(): count;
|
|
}
|
|
|
|
function xpub_drops(): count
|
|
{
|
|
local ms = Telemetry::collect_metrics("zeek", "cluster_zeromq_xpub_drops_total");
|
|
assert |ms| == 1, fmt("%s", |ms|);
|
|
return double_to_count(ms[0]$value);
|
|
}
|
|
|
|
function onloop_drops(): count
|
|
{
|
|
local ms = Telemetry::collect_metrics("zeek", "cluster_zeromq_onloop_drops_total");
|
|
assert |ms| == 1, fmt("%s", |ms|);
|
|
return double_to_count(ms[0]$value);
|
|
}
|