In guard filtering code, warn if the filter is too small according to guard params

This commit is contained in:
Neel Chauhan 2021-11-22 20:43:11 -08:00
parent e35a8bf60e
commit c36973d6d8
1 changed files with 8 additions and 1 deletions

View File

@ -347,7 +347,14 @@ impl<R: Runtime> GuardMgr<R> {
// TODO: Once we support nontrivial filters, we might have to
// swap out "active_guards" depending on which set it is.
// TODO: Warn if the filter is waaaay to small according to guard params.
if n_permitted < inner.params.min_filtered_sample_size {
warn!(
"The number of guards permitted is smaller than the guard param minimum of {}",
inner.params.min_filtered_sample_size,
);
}
info!(
?filter,
restrictive = restrictive_filter,