Reformat the world

This commit is contained in:
Tim Wojtulewicz 2021-09-16 15:35:39 -07:00
parent 194cb24547
commit b2f171ec69
714 changed files with 35149 additions and 35203 deletions

View file

@ -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