Skip to content

Commit

Permalink
[NETPATH-312] Update size defaults for network path collector (#29614)
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-schneider authored and grantseltzer committed Oct 4, 2024
1 parent 370957e commit 9643163
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ func Test_newNpCollectorImpl_defaultConfigs(t *testing.T) {

assert.Equal(t, true, npCollector.collectorConfigs.networkPathCollectorEnabled())
assert.Equal(t, 4, npCollector.workers)
assert.Equal(t, 1000, cap(npCollector.pathtestInputChan))
assert.Equal(t, 1000, cap(npCollector.pathtestProcessingChan))
assert.Equal(t, 10000, npCollector.collectorConfigs.pathtestContextsLimit)
assert.Equal(t, 100000, cap(npCollector.pathtestInputChan))
assert.Equal(t, 100000, cap(npCollector.pathtestProcessingChan))
assert.Equal(t, 100000, npCollector.collectorConfigs.pathtestContextsLimit)
assert.Equal(t, "default", npCollector.networkDevicesNamespace)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/config/setup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ func InitConfig(config pkgconfigmodel.Config) {
config.BindEnvAndSetDefault("network_path.collector.workers", 4)
config.BindEnvAndSetDefault("network_path.collector.timeout", DefaultNetworkPathTimeout)
config.BindEnvAndSetDefault("network_path.collector.max_ttl", DefaultNetworkPathMaxTTL)
config.BindEnvAndSetDefault("network_path.collector.input_chan_size", 1000)
config.BindEnvAndSetDefault("network_path.collector.processing_chan_size", 1000)
config.BindEnvAndSetDefault("network_path.collector.pathtest_contexts_limit", 10000)
config.BindEnvAndSetDefault("network_path.collector.input_chan_size", 100000)
config.BindEnvAndSetDefault("network_path.collector.processing_chan_size", 100000)
config.BindEnvAndSetDefault("network_path.collector.pathtest_contexts_limit", 100000)
config.BindEnvAndSetDefault("network_path.collector.pathtest_ttl", "15m")
config.BindEnvAndSetDefault("network_path.collector.pathtest_interval", "5m")
config.BindEnvAndSetDefault("network_path.collector.flush_interval", "10s")
Expand Down
6 changes: 3 additions & 3 deletions pkg/config/setup/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ func TestNetworkPathDefaults(t *testing.T) {
assert.Equal(t, 4, config.GetInt("network_path.collector.workers"))
assert.Equal(t, 1000, config.GetInt("network_path.collector.timeout"))
assert.Equal(t, 30, config.GetInt("network_path.collector.max_ttl"))
assert.Equal(t, 1000, config.GetInt("network_path.collector.input_chan_size"))
assert.Equal(t, 1000, config.GetInt("network_path.collector.processing_chan_size"))
assert.Equal(t, 10000, config.GetInt("network_path.collector.pathtest_contexts_limit"))
assert.Equal(t, 100000, config.GetInt("network_path.collector.input_chan_size"))
assert.Equal(t, 100000, config.GetInt("network_path.collector.processing_chan_size"))
assert.Equal(t, 100000, config.GetInt("network_path.collector.pathtest_contexts_limit"))
assert.Equal(t, 15*time.Minute, config.GetDuration("network_path.collector.pathtest_ttl"))
assert.Equal(t, 5*time.Minute, config.GetDuration("network_path.collector.pathtest_interval"))
assert.Equal(t, 10*time.Second, config.GetDuration("network_path.collector.flush_interval"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Each section from every release note are combined when the
# CHANGELOG.rst is rendered. So the text needs to be worded so that
# it does not depend on any information only available in another
# section. This may mean repeating some details, but each section
# must be readable independently of the other.
#
# Each section note must be formatted as reStructuredText.
---
enhancements:
- |
Increases the default input channel, processing channel, and context store sizes
for network traffic paths.

0 comments on commit 9643163

Please sign in to comment.