@@ -64,8 +64,6 @@ impl ConcurrencyControllerState {
6464/// predicted time and the actual time, and increase the concurrency when this is reliably sublinear and decrease it
6565/// when it is superlinear. This is clipped to avoid having a single observation weight it too much; failures
6666/// and retries max out the deviance.
67- ///
68- ///
6967pub struct AdaptiveConcurrencyController {
7068 // The current state, including tracking information and when previous adjustments were made.
7169 // Also holds related constants
@@ -161,29 +159,19 @@ impl AdaptiveConcurrencyController {
161159 . latency_predictor
162160 . update ( n_bytes, actual_completion_time, avg_concurrency) ;
163161
164- eprintln ! (
165- "success = {is_success}; n_bytes={n_bytes}, avg_con = {avg_concurrency}, t_pred = {t_pred}; t_actual = {t_actual}; dev_ratio = {dev_ratio}"
166- ) ;
167-
168162 dev_ratio
169163 } else {
170- eprintln ! ( "failure, bytes known." ) ;
171-
172164 // If it's not a success, then update the deviance with the penalty factor.
173165 max_dev
174166 }
175167 } else {
176168 // This would be a failure case, so update the
177169 debug_assert ! ( !is_success) ;
178170
179- eprintln ! ( "failure, bytes unknown." ) ;
180-
181171 max_dev
182172 }
183173 } ;
184174
185- eprintln ! ( "dev_ratio = {}; ln = {}" , deviance_ratio, deviance_ratio. ln( ) ) ;
186-
187175 // Update the deviance with this value; we're tracking the log of the ratio due
188176 // to the additive averaging.
189177 state_lg. deviance_tracking . update ( deviance_ratio. clamp ( min_dev, max_dev) . ln ( ) ) ; // deviance_ratio.ln());
@@ -197,7 +185,7 @@ impl AdaptiveConcurrencyController {
197185 self . concurrency_semaphore . increment_total_permits ( ) ;
198186 state_lg. last_adjustment_time = Instant :: now ( ) ;
199187
200- eprintln ! (
188+ debug ! (
201189 "Concurrency control for {}: Increased concurrency to {}; latency deviance = {cur_deviance}." ,
202190 self . logging_tag,
203191 self . concurrency_semaphore. total_permits( )
@@ -209,7 +197,7 @@ impl AdaptiveConcurrencyController {
209197 self . concurrency_semaphore . decrement_total_permits ( ) ;
210198 state_lg. last_adjustment_time = Instant :: now ( ) ;
211199
212- eprintln ! (
200+ debug ! (
213201 "Concurrency control for {}: Lowered concurrency to {}; latency deviance = {cur_deviance}." ,
214202 self . logging_tag,
215203 self . concurrency_semaphore. total_permits( )
@@ -218,7 +206,7 @@ impl AdaptiveConcurrencyController {
218206 }
219207
220208 if state_lg. last_logging_time . elapsed ( ) > Duration :: from_millis ( * CONCURRENCY_CONTROL_LOGGING_INTERVAL_MS ) {
221- eprintln ! (
209+ info ! (
222210 "Concurrency control for {}: Current concurrency = {}; predicted bandwidth = {}; deviance = {}" ,
223211 self . logging_tag,
224212 self . concurrency_semaphore. total_permits( ) ,
0 commit comments