mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-02 01:22:16 +00:00
fix(userspace): compute the drop ratio
in the right way
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it> Co-authored-by: Shane Lawrence <shane@lawrence.dev>
This commit is contained in:
parent
c078f7c21d
commit
a7153f2fd8
@ -91,8 +91,8 @@ bool syscall_evt_drop_mgr::process_event(std::shared_ptr<sinsp> inspector, sinsp
|
||||
if(delta.n_drops > 0)
|
||||
{
|
||||
double ratio = delta.n_drops;
|
||||
// Assuming the number of event does not contains the dropped ones
|
||||
ratio /= delta.n_drops + delta.n_evts;
|
||||
// The `n_evts` always contains the `n_drops`.
|
||||
ratio /= delta.n_evts;
|
||||
|
||||
// When simulating drops the threshold is always zero
|
||||
if(ratio > m_threshold)
|
||||
|
Loading…
Reference in New Issue
Block a user