Skip to content

Commit d0c0f01

Browse files
author
Krish
committed
define instead
1 parent 8e063c7 commit d0c0f01

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

source/s3_client.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
#include <inttypes.h>
4545
#include <math.h>
4646

47+
#define S_IDEAL_PART_SIZE 8
48+
#define S_S3_CLIENT_MINIMUM_CONCURRENT_REQUESTS 8
49+
4750
#ifdef _MSC_VER
4851
# pragma warning(disable : 4232) /* function pointer to dll symbol */
4952
#endif /* _MSC_VER */
@@ -99,12 +102,8 @@ const double s_s3_express_p50_request_latency_ms = 0.004;
99102

100103
/* Currently the ideal part size is 8MB and hence the value set.
101104
* However, this is subject to change due to newer part sizes and adjustments. */
102-
const uint32_t s_ideal_part_size = 8;
103-
104-
const uint32_t s_s3_client_minimum_concurrent_requests = 8;
105105

106-
/* x 8 to convert to megabits and match token unit */
107-
uint32_t s_s3_minimum_tokens = s_ideal_part_size * 8 * s_s3_client_minimum_concurrent_requests;
106+
const uint32_t s_s3_minimum_tokens = S_IDEAL_PART_SIZE * 8 * S_S3_CLIENT_MINIMUM_CONCURRENT_REQUESTS;
108107

109108
/**
110109
* Default max part size is 5GiB as the server limit.

0 commit comments

Comments
 (0)