From e2b668e314b225d00562d201048686a091320494 Mon Sep 17 00:00:00 2001 From: Soheil Hassas Yeganeh Date: Tue, 5 Feb 2019 15:03:46 -0500 Subject: [PATCH] Fix an issue upon setting kEmptinessTheshold. The bug is that kEmptinessTheshold is always set to 0. --- src/core/lib/channel/channelz_registry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/channel/channelz_registry.cc b/src/core/lib/channel/channelz_registry.cc index 7cca247d64d..9f0169aeaab 100644 --- a/src/core/lib/channel/channelz_registry.cc +++ b/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) {