From 2c7d4d5ad6fe81ccfa443f4237539f8acb47126f Mon Sep 17 00:00:00 2001 From: bgrozev Date: Mon, 2 Dec 2024 16:16:57 -0600 Subject: [PATCH] ref: Remove unused config properties (#1188) --- .../kotlin/org/jitsi/jicofo/bridge/BridgeConfig.kt | 11 ----------- jicofo-selector/src/main/resources/reference.conf | 4 ---- .../org/jitsi/jicofo/bridge/BridgeConfigTest.kt | 9 --------- 3 files changed, 24 deletions(-) diff --git a/jicofo-selector/src/main/kotlin/org/jitsi/jicofo/bridge/BridgeConfig.kt b/jicofo-selector/src/main/kotlin/org/jitsi/jicofo/bridge/BridgeConfig.kt index 9d0b9f5614..b9292cfec6 100644 --- a/jicofo-selector/src/main/kotlin/org/jitsi/jicofo/bridge/BridgeConfig.kt +++ b/jicofo-selector/src/main/kotlin/org/jitsi/jicofo/bridge/BridgeConfig.kt @@ -37,17 +37,6 @@ class BridgeConfig private constructor() { "$BASE.max-bridge-participants".from(JitsiConfig.newConfig) } - val maxBridgePacketRatePps: Int by config { - "org.jitsi.jicofo.BridgeSelector.MAX_BRIDGE_PACKET_RATE".from(JitsiConfig.legacyConfig) - "$BASE.max-bridge-packet-rate".from(JitsiConfig.newConfig) - } - - val averageParticipantPacketRatePps: Int by config { - "org.jitsi.jicofo.BridgeSelector.AVG_PARTICIPANT_PACKET_RATE".from(JitsiConfig.legacyConfig) - "$BASE.average-participant-packet-rate-pps" - .from(JitsiConfig.newConfig).softDeprecated("use $BASE.average-participant-stress") - } - val averageParticipantStress: Double by config { "$BASE.average-participant-stress".from(JitsiConfig.newConfig) } diff --git a/jicofo-selector/src/main/resources/reference.conf b/jicofo-selector/src/main/resources/reference.conf index c8f15eef31..c89c6d6c03 100644 --- a/jicofo-selector/src/main/resources/reference.conf +++ b/jicofo-selector/src/main/resources/reference.conf @@ -16,10 +16,6 @@ jicofo { bridge { // The maximum number of participants in a single conference to put on one bridge (use -1 for no maximum). max-bridge-participants = 80 - // The assumed maximum packet rate that a bridge can handle. - max-bridge-packet-rate = 50000 - // The assumed average packet rate per participant. - average-participant-packet-rate-pps = 500 // The default assumed average stress per participant. This value is only used when a bridge does not report its // own value. average-participant-stress = 0.01 diff --git a/jicofo-selector/src/test/kotlin/org/jitsi/jicofo/bridge/BridgeConfigTest.kt b/jicofo-selector/src/test/kotlin/org/jitsi/jicofo/bridge/BridgeConfigTest.kt index 6cb7768688..92f9851274 100644 --- a/jicofo-selector/src/test/kotlin/org/jitsi/jicofo/bridge/BridgeConfigTest.kt +++ b/jicofo-selector/src/test/kotlin/org/jitsi/jicofo/bridge/BridgeConfigTest.kt @@ -32,29 +32,21 @@ class BridgeConfigTest : ShouldSpec() { MetaconfigSettings.cacheEnabled = false context("with no config the defaults from reference.conf should be used") { config.maxBridgeParticipants shouldBe 80 - config.maxBridgePacketRatePps shouldBe 50000 - config.averageParticipantPacketRatePps shouldBe 500 } context("with legacy config") { withLegacyConfig(legacyConfig) { config.maxBridgeParticipants shouldBe 111 - config.maxBridgePacketRatePps shouldBe 111 - config.averageParticipantPacketRatePps shouldBe 111 } } context("with new config") { withNewConfig(newConfig) { config.maxBridgeParticipants shouldBe 222 - config.maxBridgePacketRatePps shouldBe 222 - config.averageParticipantPacketRatePps shouldBe 222 } } context("with both legacy and new config the legacy values should be used") { withLegacyConfig(legacyConfig) { withNewConfig(newConfig) { config.maxBridgeParticipants shouldBe 111 - config.maxBridgePacketRatePps shouldBe 111 - config.averageParticipantPacketRatePps shouldBe 111 } } } @@ -115,7 +107,6 @@ private val newConfig = """ jicofo { bridge { max-bridge-participants=222 - max-bridge-packet-rate=222 average-participant-packet-rate-pps=222 } }