Fix an issue upon setting kEmptinessTheshold.

The bug is that kEmptinessTheshold is always set to 0.
pull/17931/head
Soheil Hassas Yeganeh 6 years ago
parent 6d293e5bda
commit e2b668e314
  1. 2
      src/core/lib/channel/channelz_registry.cc

@ -62,7 +62,7 @@ void ChannelzRegistry::InternalRegister(BaseNode* node) {
}
void ChannelzRegistry::MaybePerformCompactionLocked() {
constexpr double kEmptinessTheshold = 1 / 3;
constexpr double kEmptinessTheshold = 1. / 3;
double emptiness_ratio =
double(num_empty_slots_) / double(entities_.capacity());
if (emptiness_ratio > kEmptinessTheshold) {

Loading…
Cancel
Save