Merge pull request #17931 from soheilhy/channelz-threshold-fix

Fix an issue upon setting kEmptinessTheshold.
pull/18088/head
Soheil Hassas Yeganeh 6 years ago committed by GitHub
commit b3b5d63423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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