@@ -22,7 +22,7 @@ public abstract class SloTableContext<T> : ISloContext
22
22
{
23
23
private const int IntervalMs = 100 ;
24
24
25
- protected static readonly ILogger Logger = ISloContext . Factory . CreateLogger < SloTableContext < T > > ( ) ;
25
+ private static readonly ILogger Logger = ISloContext . Factory . CreateLogger < SloTableContext < T > > ( ) ;
26
26
27
27
private volatile int _maxId ;
28
28
@@ -129,8 +129,7 @@ public async Task Run(RunConfig runConfig)
129
129
Logger . LogInformation ( "Run task is finished" ) ;
130
130
return ;
131
131
132
- async Task ShootingTask ( RateLimiter rateLimitPolicy , string operationType ,
133
- Func < T , RunConfig , Task < int > > action )
132
+ async Task ShootingTask ( RateLimiter rateLimitPolicy , string operationType , Func < T , RunConfig , Task > action )
134
133
{
135
134
var metricFactory = Metrics . WithLabels ( new Dictionary < string , string >
136
135
{
@@ -182,11 +181,6 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
182
181
}
183
182
) ;
184
183
185
- var retryAttempts = metricFactory . CreateGauge (
186
- "sdk_retry_attempts" ,
187
- "Current retry attempts, categorized by operation type."
188
- ) ;
189
-
190
184
var pendingOperations = metricFactory . CreateGauge (
191
185
"sdk_pending_operations" ,
192
186
"Current number of pending operations, categorized by type."
@@ -218,9 +212,8 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
218
212
var sw = Stopwatch . StartNew ( ) ;
219
213
try
220
214
{
221
- var attempts = await action ( client , runConfig ) ;
215
+ await action ( client , runConfig ) ;
222
216
sw . Stop ( ) ;
223
- retryAttempts . Set ( attempts ) ;
224
217
operationsTotal . Inc ( ) ;
225
218
pendingOperations . Dec ( ) ;
226
219
operationsSuccessTotal . Inc ( ) ;
@@ -248,7 +241,7 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
248
241
// return attempt count & StatusCode operation
249
242
protected abstract Task < int > Save ( T client , SloTable sloTable , int writeTimeout ) ;
250
243
251
- protected abstract Task < ( int , object ? ) > Select ( T client , ( Guid Guid , int Id ) select , int readTimeout ) ;
244
+ protected abstract Task < object ? > Select ( T client , ( Guid Guid , int Id ) select , int readTimeout ) ;
252
245
253
246
protected abstract Task < int > SelectCount ( T client ) ;
254
247
@@ -272,12 +265,10 @@ private Task<int> Save(T client, Config config)
272
265
return Save ( client , sloTable , config . WriteTimeout ) ;
273
266
}
274
267
275
- private async Task < int > Select ( T client , RunConfig config )
268
+ private async Task Select ( T client , RunConfig config )
276
269
{
277
270
var id = Random . Shared . Next ( _maxId ) ;
278
- var ( attempts , _) = await Select ( client , new ValueTuple < Guid , int > ( GuidFromInt ( id ) , id ) , config . ReadTimeout ) ;
279
-
280
- return attempts ;
271
+ _ = await Select ( client , new ValueTuple < Guid , int > ( GuidFromInt ( id ) , id ) , config . ReadTimeout ) ;
281
272
}
282
273
283
274
private static Guid GuidFromInt ( int value )
0 commit comments