same as for `BENCHMARK_KNN` why don't you check what's the log level with a branch and if it's `MSG_DEBUG` then execute the loops..