pub(super) fn check_over_limits(
bytes_count: usize,
words_count: usize,
fst_graph_config: &crate::config::FstStoreGraphConfig,
) -> bool {
let max_size = fst_graph_config.max_size * 1024;
if bytes_count >= max_size {
tracing::info!(
"fst has exceeded maximum allowed bytes: {bytes_count} over limit: {max_size}"
);
return true;
}
let max_words = fst_graph_config.max_words;
if words_count >= max_words {
tracing::info!(
"fst has exceeded maximum allowed words: {words_count} over limit: {max_words}"
);
return true;
}
false
}