5
5
# Copyright, 2020, by Simon Perepelitsa.
6
6
# Copyright, 2024, by Thomas Morgan.
7
7
8
- require ' console/logger'
8
+ require " console/logger"
9
9
10
- require ' async'
11
- require ' async/notification'
12
- require ' async/semaphore'
10
+ require " async"
11
+ require " async/notification"
12
+ require " async/semaphore"
13
13
14
- require ' traces'
15
- require ' metrics'
14
+ require " traces"
15
+ require " metrics"
16
16
17
17
module Async
18
18
module Pool
@@ -396,7 +396,7 @@ def create_resource(...)
396
396
tags : @tags ,
397
397
}
398
398
399
- Traces . trace ( ' async.pool.create' , attributes : attributes ) { super }
399
+ Traces . trace ( " async.pool.create" , attributes : attributes ) { super }
400
400
end
401
401
402
402
def drain ( ...)
@@ -405,14 +405,14 @@ def drain(...)
405
405
tags : @tags ,
406
406
}
407
407
408
- Traces . trace ( ' async.pool.drain' , attributes : attributes ) { super }
408
+ Traces . trace ( " async.pool.drain" , attributes : attributes ) { super }
409
409
end
410
410
end
411
411
412
412
Metrics ::Provider ( self ) do
413
- ACQUIRE_COUNT = Metrics . metric ( ' async.pool.acquire' , :counter , description : ' Number of times a resource was invoked.' )
414
- RELEASE_COUNT = Metrics . metric ( ' async.pool.release' , :counter , description : ' Number of times a resource was released.' )
415
- RETIRE_COUNT = Metrics . metric ( ' async.pool.retire' , :counter , description : ' Number of times a resource was retired.' )
413
+ ACQUIRE_COUNT = Metrics . metric ( " async.pool.acquire" , :counter , description : " Number of times a resource was invoked." )
414
+ RELEASE_COUNT = Metrics . metric ( " async.pool.release" , :counter , description : " Number of times a resource was released." )
415
+ RETIRE_COUNT = Metrics . metric ( " async.pool.retire" , :counter , description : " Number of times a resource was retired." )
416
416
417
417
def acquire ( ...)
418
418
ACQUIRE_COUNT . emit ( 1 , tags : @tags )
0 commit comments