Skip to content

Commit b211cbd

Browse files
committed
Apply CR suggestions
1 parent e768104 commit b211cbd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

DatadogCore/Sources/SDKMetrics/BenchmarkURLSessionTaskDelegate.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
* Copyright 2019-Present Datadog, Inc.
55
*/
66

7+
#if DD_BENCHMARK
8+
79
import Foundation
810
import DatadogInternal
911

10-
/// Common definitions forcallencting metrics during benchmark execution..
12+
/// `URLSessionTaskDelegate` implementation to collect network request metrics during benchmark execution.
1113
internal final class BenchmarkURLSessionTaskDelegate: NSObject, URLSessionTaskDelegate {
1214
let track: String
1315

@@ -20,3 +22,5 @@ internal final class BenchmarkURLSessionTaskDelegate: NSObject, URLSessionTaskDe
2022
.record(metrics.taskInterval.duration, attributes: ["track": track])
2123
}
2224
}
25+
26+
#endif

DatadogInternal/Sources/Benchmarks/BenchmarkProfiler.swift

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ public protocol BenchmarkMeter {
5757
/// - Returns: The gauge instance.
5858
func gauge(metric: @autoclosure () -> String) -> BenchmarkGauge
5959

60+
/// Observe a measure value.
61+
///
62+
/// - Parameters:
63+
/// - metric: The metric name.
64+
/// - callback: Callback providing a gauge instance to record a value.
6065
func observe(metric: @autoclosure () -> String, callback: @escaping (BenchmarkGauge) -> Void )
6166
}
6267

0 commit comments

Comments
 (0)