MetricsTestKit: expose all metrics publicly. This allows users to run checks on counters when they might not know the exact label (#127)

Co-authored-by: Hamzah Malik <hamzah_malik@apple.com>
This commit is contained in:
hamzahrmalik 2023-05-26 13:02:46 +01:00 committed by GitHub
parent 9d5ff3d48f
commit 8bcdb6e82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,7 @@ extension TestMetrics {
} }
/// All the counters which have been created and not destroyed /// All the counters which have been created and not destroyed
var counters: [TestCounter] { public var counters: [TestCounter] {
let counters = self.lock.withLock { let counters = self.lock.withLock {
self._counters self._counters
} }
@ -220,7 +220,7 @@ extension TestMetrics {
} }
/// All the meters which have been created and not destroyed /// All the meters which have been created and not destroyed
var meters: [TestMeter] { public var meters: [TestMeter] {
let meters = self.lock.withLock { let meters = self.lock.withLock {
self._meters self._meters
} }
@ -247,7 +247,7 @@ extension TestMetrics {
} }
/// All the recorders which have been created and not destroyed /// All the recorders which have been created and not destroyed
var recorders: [TestRecorder] { public var recorders: [TestRecorder] {
let recorders = self.lock.withLock { let recorders = self.lock.withLock {
self._recorders self._recorders
} }
@ -274,7 +274,7 @@ extension TestMetrics {
} }
/// All the timers which have been created and not destroyed /// All the timers which have been created and not destroyed
var timers: [TestTimer] { public var timers: [TestTimer] {
let timers = self.lock.withLock { let timers = self.lock.withLock {
self._timers self._timers
} }