@@ -22,7 +22,7 @@ public abstract class SloTableContext<T> : ISloContext
2222{
2323 private const int IntervalMs = 100 ;
2424
25- protected static readonly ILogger Logger = ISloContext . Factory . CreateLogger < SloTableContext < T > > ( ) ;
25+ private static readonly ILogger Logger = ISloContext . Factory . CreateLogger < SloTableContext < T > > ( ) ;
2626
2727 private volatile int _maxId ;
2828
@@ -129,8 +129,7 @@ public async Task Run(RunConfig runConfig)
129129 Logger . LogInformation ( "Run task is finished" ) ;
130130 return ;
131131
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 )
134133 {
135134 var metricFactory = Metrics . WithLabels ( new Dictionary < string , string >
136135 {
@@ -182,11 +181,6 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
182181 }
183182 ) ;
184183
185- var retryAttempts = metricFactory . CreateGauge (
186- "sdk_retry_attempts" ,
187- "Current retry attempts, categorized by operation type."
188- ) ;
189-
190184 var pendingOperations = metricFactory . CreateGauge (
191185 "sdk_pending_operations" ,
192186 "Current number of pending operations, categorized by type."
@@ -218,9 +212,8 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
218212 var sw = Stopwatch . StartNew ( ) ;
219213 try
220214 {
221- var attempts = await action ( client , runConfig ) ;
215+ await action ( client , runConfig ) ;
222216 sw . Stop ( ) ;
223- retryAttempts . Set ( attempts ) ;
224217 operationsTotal . Inc ( ) ;
225218 pendingOperations . Dec ( ) ;
226219 operationsSuccessTotal . Inc ( ) ;
@@ -248,7 +241,7 @@ async Task ShootingTask(RateLimiter rateLimitPolicy, string operationType,
248241 // return attempt count & StatusCode operation
249242 protected abstract Task < int > Save ( T client , SloTable sloTable , int writeTimeout ) ;
250243
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 ) ;
252245
253246 protected abstract Task < int > SelectCount ( T client ) ;
254247
@@ -272,12 +265,10 @@ private Task<int> Save(T client, Config config)
272265 return Save ( client , sloTable , config . WriteTimeout ) ;
273266 }
274267
275- private async Task < int > Select ( T client , RunConfig config )
268+ private async Task Select ( T client , RunConfig config )
276269 {
277270 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 ) ;
281272 }
282273
283274 private static Guid GuidFromInt ( int value )
0 commit comments