Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
  • Loading branch information
sethiay committed Jun 26, 2024
1 parent ea56e53 commit 42783e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/config/config_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ func ListCacheTtlSecsToDuration(secs int64) time.Duration {
return time.Duration(secs * int64(time.Second))
}

func DefaultMaxDownloadParallelism() int {
func DefaultMaxParallelDownloads() int {
return max(16, 2*runtime.NumCPU())
}
4 changes: 2 additions & 2 deletions internal/config/config_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,6 @@ func Test_ListCacheTtlSecsToDuration_InvalidCall(t *testing.T) {
ListCacheTtlSecsToDuration(-3)
}

func Test_DefaultMaxDownloadParallelism(t *testing.T) {
assert.GreaterOrEqual(t, DefaultMaxDownloadParallelism(), 16)
func Test_DefaultMaxParallelDownloads(t *testing.T) {
assert.GreaterOrEqual(t, DefaultMaxParallelDownloads(), 16)
}
2 changes: 1 addition & 1 deletion internal/config/mount_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func NewMountConfig() *MountConfig {
MaxSizeMB: DefaultFileCacheMaxSizeMB,
EnableParallelDownloads: DefaultEnableParallelDownloads,
ParallelDownloadsPerFile: DefaultParallelDownloadsPerFile,
MaxParallelDownloads: DefaultMaxDownloadParallelism(),
MaxParallelDownloads: DefaultMaxParallelDownloads(),
DownloadChunkSizeMB: DefaultDownloadChunkSizeMB,
EnableCRC: DefaultEnableCRC,
}
Expand Down

0 comments on commit 42783e6

Please sign in to comment.