@@ -21,7 +21,7 @@ class MetricsTests: XCTestCase {
21
21
let metrics = TestMetrics ( )
22
22
MetricsSystem . bootstrapInternal ( metrics)
23
23
let group = DispatchGroup ( )
24
- let name = " counter- \( NSUUID ( ) . uuidString) "
24
+ let name = " counter- \( UUID ( ) . uuidString) "
25
25
let counter = Counter ( label: name)
26
26
let testCounter = counter. _handler as! TestCounter
27
27
let total = Int . random ( in: 500 ... 1000 )
@@ -43,7 +43,7 @@ class MetricsTests: XCTestCase {
43
43
let metrics = TestMetrics ( )
44
44
MetricsSystem . bootstrapInternal ( metrics)
45
45
// run the test
46
- let name = " counter- \( NSUUID ( ) . uuidString) "
46
+ let name = " counter- \( UUID ( ) . uuidString) "
47
47
let value = Int . random ( in: Int . min ... Int . max)
48
48
Counter ( label: name) . increment ( by: value)
49
49
let counter = metrics. counters [ name] as! TestCounter
@@ -150,7 +150,7 @@ class MetricsTests: XCTestCase {
150
150
let metrics = TestMetrics ( )
151
151
MetricsSystem . bootstrapInternal ( metrics)
152
152
let group = DispatchGroup ( )
153
- let name = " recorder- \( NSUUID ( ) . uuidString) "
153
+ let name = " recorder- \( UUID ( ) . uuidString) "
154
154
let recorder = Recorder ( label: name)
155
155
let testRecorder = recorder. _handler as! TestRecorder
156
156
let total = Int . random ( in: 500 ... 1000 )
@@ -202,7 +202,7 @@ class MetricsTests: XCTestCase {
202
202
let metrics = TestMetrics ( )
203
203
MetricsSystem . bootstrapInternal ( metrics)
204
204
// run the test
205
- let name = " recorder- \( NSUUID ( ) . uuidString) "
205
+ let name = " recorder- \( UUID ( ) . uuidString) "
206
206
let value = Double . random ( in: Double ( Int . min) ... Double ( Int . max) )
207
207
Recorder ( label: name) . record ( value)
208
208
let recorder = metrics. recorders [ name] as! TestRecorder
@@ -215,7 +215,7 @@ class MetricsTests: XCTestCase {
215
215
let metrics = TestMetrics ( )
216
216
MetricsSystem . bootstrapInternal ( metrics)
217
217
let group = DispatchGroup ( )
218
- let name = " timer- \( NSUUID ( ) . uuidString) "
218
+ let name = " timer- \( UUID ( ) . uuidString) "
219
219
let timer = Timer ( label: name)
220
220
let testTimer = timer. _handler as! TestTimer
221
221
let total = Int . random ( in: 500 ... 1000 )
@@ -235,7 +235,7 @@ class MetricsTests: XCTestCase {
235
235
let metrics = TestMetrics ( )
236
236
MetricsSystem . bootstrapInternal ( metrics)
237
237
// run the test
238
- let name = " timer- \( NSUUID ( ) . uuidString) "
238
+ let name = " timer- \( UUID ( ) . uuidString) "
239
239
let value = Int64 . random ( in: Int64 . min ... Int64 . max)
240
240
Timer ( label: name) . recordNanoseconds ( value)
241
241
let timer = metrics. timers [ name] as! TestTimer
@@ -339,7 +339,7 @@ class MetricsTests: XCTestCase {
339
339
let metrics = TestMetrics ( )
340
340
MetricsSystem . bootstrapInternal ( metrics)
341
341
// run the test
342
- let name = " gauge- \( NSUUID ( ) . uuidString) "
342
+ let name = " gauge- \( UUID ( ) . uuidString) "
343
343
let value = Double . random ( in: - 1000 ... 1000 )
344
344
let gauge = Gauge ( label: name)
345
345
gauge. record ( value)
@@ -353,7 +353,7 @@ class MetricsTests: XCTestCase {
353
353
let metrics = TestMetrics ( )
354
354
MetricsSystem . bootstrapInternal ( metrics)
355
355
// run the test
356
- let name = " gauge- \( NSUUID ( ) . uuidString) "
356
+ let name = " gauge- \( UUID ( ) . uuidString) "
357
357
let value = Double . random ( in: - 1000 ... 1000 )
358
358
Gauge ( label: name) . record ( value)
359
359
let recorder = metrics. recorders [ name] as! TestRecorder
@@ -366,7 +366,7 @@ class MetricsTests: XCTestCase {
366
366
let factories = [ TestMetrics ( ) , TestMetrics ( ) , TestMetrics ( ) ]
367
367
MetricsSystem . bootstrapInternal ( MultiplexMetricsHandler ( factories: factories) )
368
368
// run the test
369
- let name = NSUUID ( ) . uuidString
369
+ let name = UUID ( ) . uuidString
370
370
let value = Int . random ( in: Int . min ... Int . max)
371
371
let muxCounter = Counter ( label: name)
372
372
muxCounter. increment ( by: value)
@@ -388,7 +388,7 @@ class MetricsTests: XCTestCase {
388
388
let factories = [ TestMetrics ( ) , TestMetrics ( ) , TestMetrics ( ) ]
389
389
MetricsSystem . bootstrapInternal ( MultiplexMetricsHandler ( factories: factories) )
390
390
// run the test
391
- let name = NSUUID ( ) . uuidString
391
+ let name = UUID ( ) . uuidString
392
392
let value = Double . random ( in: 0 ... 1 )
393
393
let muxRecorder = Recorder ( label: name)
394
394
muxRecorder. record ( value)
@@ -405,7 +405,7 @@ class MetricsTests: XCTestCase {
405
405
let factories = [ TestMetrics ( ) , TestMetrics ( ) , TestMetrics ( ) ]
406
406
MetricsSystem . bootstrapInternal ( MultiplexMetricsHandler ( factories: factories) )
407
407
// run the test
408
- let name = NSUUID ( ) . uuidString
408
+ let name = UUID ( ) . uuidString
409
409
let seconds = Int . random ( in: 1 ... 10 )
410
410
let muxTimer = Timer ( label: name, preferredDisplayUnit: . minutes)
411
411
muxTimer. recordSeconds ( seconds)
@@ -435,7 +435,7 @@ class MetricsTests: XCTestCase {
435
435
let metrics = TestMetrics ( )
436
436
MetricsSystem . bootstrapInternal ( metrics)
437
437
438
- let name = " gauge- \( NSUUID ( ) . uuidString) "
438
+ let name = " gauge- \( UUID ( ) . uuidString) "
439
439
let value = Double . random ( in: - 1000 ... 1000 )
440
440
441
441
let gauge = Gauge ( label: name)
@@ -465,7 +465,7 @@ class MetricsTests: XCTestCase {
465
465
let metrics = TestMetrics ( )
466
466
MetricsSystem . bootstrapInternal ( metrics)
467
467
468
- let name = " counter- \( NSUUID ( ) . uuidString) "
468
+ let name = " counter- \( UUID ( ) . uuidString) "
469
469
let value = Int . random ( in: 0 ... 1000 )
470
470
471
471
let counter = Counter ( label: name)
@@ -495,7 +495,7 @@ class MetricsTests: XCTestCase {
495
495
let metrics = TestMetrics ( )
496
496
MetricsSystem . bootstrapInternal ( metrics)
497
497
498
- let name = " timer- \( NSUUID ( ) . uuidString) "
498
+ let name = " timer- \( UUID ( ) . uuidString) "
499
499
let value = Int64 . random ( in: 0 ... 1000 )
500
500
501
501
let timer = Timer ( label: name)
0 commit comments