mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -1,19 +1,21 @@
|
|||
#include "zeek/WeirdState.h"
|
||||
|
||||
#include "zeek/RunState.h"
|
||||
#include "zeek/util.h"
|
||||
|
||||
namespace zeek::detail {
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold,
|
||||
uint64_t rate, double duration)
|
||||
{
|
||||
bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold, uint64_t rate,
|
||||
double duration)
|
||||
{
|
||||
auto& state = wsm[name];
|
||||
++state.count;
|
||||
|
||||
if ( state.count <= threshold )
|
||||
return true;
|
||||
|
||||
if ( state.count == threshold + 1)
|
||||
if ( state.count == threshold + 1 )
|
||||
state.sampling_start_time = run_state::network_time;
|
||||
else
|
||||
{
|
||||
|
@ -30,6 +32,6 @@ bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold,
|
|||
return num_above_threshold % rate == 0;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue