Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: optimize some conversions of unsigned ints to NSString #2863

Merged
Merged
12 changes: 8 additions & 4 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
7BA61CB9247BC57B00C130A8 /* SentryCrashDefaultBinaryImageProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CB8247BC57B00C130A8 /* SentryCrashDefaultBinaryImageProvider.h */; };
7BA61CBB247BC5D800C130A8 /* SentryCrashDefaultBinaryImageProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CBA247BC5D800C130A8 /* SentryCrashDefaultBinaryImageProvider.m */; };
7BA61CBD247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CBC247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift */; };
7BA61CBF247CEA8100C130A8 /* SentryHexAddressFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CBE247CEA8100C130A8 /* SentryHexAddressFormatter.h */; };
7BA61CBF247CEA8100C130A8 /* SentryFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */; };
7BA61CC6247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CC5247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift */; };
7BA61CC8247D125400C130A8 /* SentryThreadInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */; };
7BA61CCA247D128B00C130A8 /* SentryThreadInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */; };
Expand Down Expand Up @@ -627,6 +627,7 @@
8453421228BE855D00C22EEC /* SentrySampleDecision.m in Sources */ = {isa = PBXBuildFile; fileRef = 8453421128BE855D00C22EEC /* SentrySampleDecision.m */; };
8453421628BE8A9500C22EEC /* SentrySpanStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 8453421528BE8A9500C22EEC /* SentrySpanStatus.m */; };
8454CF8D293EAF9A006AC140 /* SentryMetricProfiler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8454CF8B293EAF9A006AC140 /* SentryMetricProfiler.mm */; };
849AC40029E0C1FF00889C16 /* SentryFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */; };
84A888FD28D9B11700C51DFD /* SentryProfiler+Test.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A888FC28D9B11700C51DFD /* SentryProfiler+Test.h */; };
84A8891C28DBD28900C51DFD /* SentryDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A8891A28DBD28900C51DFD /* SentryDevice.h */; };
84A8891D28DBD28900C51DFD /* SentryDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84A8891B28DBD28900C51DFD /* SentryDevice.mm */; };
Expand Down Expand Up @@ -1313,7 +1314,7 @@
7BA61CB8247BC57B00C130A8 /* SentryCrashDefaultBinaryImageProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryCrashDefaultBinaryImageProvider.h; path = include/SentryCrashDefaultBinaryImageProvider.h; sourceTree = "<group>"; };
7BA61CBA247BC5D800C130A8 /* SentryCrashDefaultBinaryImageProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryCrashDefaultBinaryImageProvider.m; sourceTree = "<group>"; };
7BA61CBC247BC6B900C130A8 /* TestSentryCrashBinaryImageProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryCrashBinaryImageProvider.swift; sourceTree = "<group>"; };
7BA61CBE247CEA8100C130A8 /* SentryHexAddressFormatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryHexAddressFormatter.h; path = include/SentryHexAddressFormatter.h; sourceTree = "<group>"; };
7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryFormatter.h; path = include/SentryFormatter.h; sourceTree = "<group>"; };
7BA61CC5247CFC5F00C130A8 /* SentryCrashDefaultBinaryImageProviderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashDefaultBinaryImageProviderTests.swift; sourceTree = "<group>"; };
7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryThreadInspector.h; path = include/SentryThreadInspector.h; sourceTree = "<group>"; };
7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryThreadInspector.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1537,6 +1538,7 @@
849472802971C107002603DE /* SentrySystemWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySystemWrapperTests.swift; sourceTree = "<group>"; };
849472822971C2CD002603DE /* SentryNSProcessInfoWrapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSProcessInfoWrapperTests.swift; sourceTree = "<group>"; };
849472842971C41A002603DE /* SentryNSTimerWrapperTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryNSTimerWrapperTest.swift; sourceTree = "<group>"; };
849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryFormatterTests.swift; sourceTree = "<group>"; };
84A888FC28D9B11700C51DFD /* SentryProfiler+Test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SentryProfiler+Test.h"; path = "Sources/Sentry/include/SentryProfiler+Test.h"; sourceTree = SOURCE_ROOT; };
84A8891A28DBD28900C51DFD /* SentryDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDevice.h; path = include/SentryDevice.h; sourceTree = "<group>"; };
84A8891B28DBD28900C51DFD /* SentryDevice.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryDevice.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1993,7 +1995,7 @@
7BA61CBA247BC5D800C130A8 /* SentryCrashDefaultBinaryImageProvider.m */,
7BA61CAA247BA98100C130A8 /* SentryDebugImageProvider.h */,
7BA61CAC247BAA0B00C130A8 /* SentryDebugImageProvider.m */,
7BA61CBE247CEA8100C130A8 /* SentryHexAddressFormatter.h */,
7BA61CBE247CEA8100C130A8 /* SentryFormatter.h */,
7BA61CC7247D125400C130A8 /* SentryThreadInspector.h */,
7BA61CC9247D128B00C130A8 /* SentryThreadInspector.m */,
7B7D872B2486480B00D2ECFF /* SentryStacktraceBuilder.h */,
Expand Down Expand Up @@ -2692,6 +2694,7 @@
7BD7299B24654CD500EA3610 /* Helper */ = {
isa = PBXGroup;
children = (
849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */,
7B88F30324BC8E6500ADF90A /* SentrySerializationTests.swift */,
15E0A8EF240F638200F044E3 /* SentrySerializationNilTests.m */,
7BA61EA525F21E660008CAA2 /* SentryLogTests.swift */,
Expand Down Expand Up @@ -3465,7 +3468,7 @@
03F84D2127DD414C008FE43F /* SentrySamplingProfiler.hpp in Headers */,
63FE712B20DA4C1100CDBAE8 /* SentryCrashStackCursor.h in Headers */,
D8C67E9C28000E24007E326E /* SentryScreenshot.h in Headers */,
7BA61CBF247CEA8100C130A8 /* SentryHexAddressFormatter.h in Headers */,
7BA61CBF247CEA8100C130A8 /* SentryFormatter.h in Headers */,
7B8713B226415B7A006D6004 /* SentryAppStartTracker.h in Headers */,
D8370B6C273DF20F00F66E2D /* SentryNSURLSessionTaskSearch.h in Headers */,
7B96572026830C9100C66E25 /* SentryScopeSyncC.h in Headers */,
Expand Down Expand Up @@ -4249,6 +4252,7 @@
7BC6EC04255C235F0059822A /* SentryFrameTests.swift in Sources */,
0AE455AD28F584D2006680E5 /* SentryReachabilityTests.m in Sources */,
63FE720420DA66EC00CDBAE8 /* SentryCrashString_Tests.m in Sources */,
849AC40029E0C1FF00889C16 /* SentryFormatterTests.swift in Sources */,
7BDDE3CC2966BD4700EB9177 /* SentryMXManagerTests.swift in Sources */,
7BC6EC0C255C3DF80059822A /* SentryThreadTests.swift in Sources */,
D884A20527C80F6300074664 /* SentryCoreDataTrackerTest.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryCrashDefaultMachineContextWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#import "SentryCrashStackCursor.h"
#import "SentryCrashStackCursor_SelfThread.h"
#import "SentryCrashThread.h"
#import "SentryFormatter.h"
#import "SentryFrame.h"
#import "SentryHexAddressFormatter.h"
#import "SentryStacktrace.h"
#import "SentryStacktraceBuilder.h"
#import "SentryThread.h"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryCrashReportConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#import "SentryDebugMeta.h"
#import "SentryEvent.h"
#import "SentryException.h"
#import "SentryFormatter.h"
#import "SentryFrame.h"
#import "SentryHexAddressFormatter.h"
#import "SentryInAppLogic.h"
#import "SentryInternalDefines.h"
#import "SentryLog.h"
Expand Down
11 changes: 4 additions & 7 deletions Sources/Sentry/SentryCrashStackEntryMapper.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "SentryCrashStackEntryMapper.h"
#import "SentryFormatter.h"
#import "SentryFrame.h"
#import "SentryHexAddressFormatter.h"
#import "SentryInAppLogic.h"
#import <Foundation/Foundation.h>

Expand All @@ -27,14 +27,11 @@ - (SentryFrame *)sentryCrashStackEntryToSentryFrame:(SentryCrashStackEntry)stack
{
SentryFrame *frame = [[SentryFrame alloc] init];

NSNumber *symbolAddress = @(stackEntry.symbolAddress);
frame.symbolAddress = sentry_formatHexAddress(symbolAddress);
frame.symbolAddress = sentry_formatHexAddressUInt64(stackEntry.symbolAddress);

NSNumber *instructionAddress = @(stackEntry.address);
frame.instructionAddress = sentry_formatHexAddress(instructionAddress);
frame.instructionAddress = sentry_formatHexAddressUInt64(stackEntry.address);

NSNumber *imageAddress = @(stackEntry.imageAddress);
frame.imageAddress = sentry_formatHexAddress(imageAddress);
frame.imageAddress = sentry_formatHexAddressUInt64(stackEntry.imageAddress);

if (stackEntry.symbolName != NULL) {
frame.function = [NSString stringWithCString:stackEntry.symbolName
Expand Down
8 changes: 3 additions & 5 deletions Sources/Sentry/SentryDebugImageProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#import "SentryCrashDynamicLinker.h"
#import "SentryCrashUUIDConversion.h"
#import "SentryDebugMeta.h"
#import "SentryFormatter.h"
#import "SentryFrame.h"
#import "SentryHexAddressFormatter.h"
#import "SentryInternalDefines.h"
#import "SentryLog.h"
#import "SentryStacktrace.h"
Expand Down Expand Up @@ -102,12 +102,10 @@ - (SentryDebugMeta *)fillDebugMetaFrom:(SentryCrashBinaryImage)image
debugMeta.type = SentryDebugImageType;

if (image.vmAddress > 0) {
NSNumber *imageVmAddress = [NSNumber numberWithUnsignedLongLong:image.vmAddress];
debugMeta.imageVmAddress = sentry_formatHexAddress(imageVmAddress);
debugMeta.imageVmAddress = sentry_formatHexAddressUInt64(image.vmAddress);
}

NSNumber *imageAddress = [NSNumber numberWithUnsignedLongLong:image.address];
debugMeta.imageAddress = sentry_formatHexAddress(imageAddress);
debugMeta.imageAddress = sentry_formatHexAddressUInt64(image.address);

debugMeta.imageSize = @(image.size);

Expand Down
12 changes: 6 additions & 6 deletions Sources/Sentry/SentryMetricKitIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#import <SentryDependencyContainer.h>
#import <SentryEvent.h>
#import <SentryException.h>
#import <SentryFormatter.h>
#import <SentryFrame.h>
#import <SentryHexAddressFormatter.h>
#import <SentryInAppLogic.h>
#import <SentryLog.h>
#import <SentryMechanism.h>
Expand Down Expand Up @@ -386,9 +386,9 @@ - (SentryStacktrace *)convertMXFramesToSentryStacktrace:(NSEnumerator<SentryMXFr
SentryFrame *frame = [[SentryFrame alloc] init];
frame.package = mxFrame.binaryName;
frame.inApp = @([self.inAppLogic isInApp:mxFrame.binaryName]);
frame.instructionAddress = sentry_formatHexAddress(@(mxFrame.address));
NSNumber *imageAddress = @(mxFrame.address - mxFrame.offsetIntoBinaryTextSegment);
frame.imageAddress = sentry_formatHexAddress(imageAddress);
frame.instructionAddress = sentry_formatHexAddressUInt64(mxFrame.address);
uint64_t imageAddress = mxFrame.address - mxFrame.offsetIntoBinaryTextSegment;
frame.imageAddress = sentry_formatHexAddressUInt64(imageAddress);

[frames addObject:frame];
}
Expand Down Expand Up @@ -437,8 +437,8 @@ - (SentryStacktrace *)convertMXFramesToSentryStacktrace:(NSEnumerator<SentryMXFr
debugMeta.debugID = binaryUUID;
debugMeta.codeFile = mxFrame.binaryName;

NSNumber *imageAddress = @(mxFrame.address - mxFrame.offsetIntoBinaryTextSegment);
debugMeta.imageAddress = sentry_formatHexAddress(imageAddress);
uint64_t imageAddress = mxFrame.address - mxFrame.offsetIntoBinaryTextSegment;
debugMeta.imageAddress = sentry_formatHexAddressUInt64(imageAddress);

debugMetas[debugMeta.debugID] = debugMeta;
}
Expand Down
5 changes: 3 additions & 2 deletions Sources/Sentry/SentryMetricProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#if SENTRY_TARGET_PROFILING_SUPPORTED

# import "SentryEvent+Private.h"
# import "SentryFormatter.h"
# import "SentryLog.h"
# import "SentryNSProcessInfoWrapper.h"
# import "SentryNSTimerWrapper.h"
Expand Down Expand Up @@ -59,8 +60,8 @@ @implementation SentryMetricReading
const auto relativeTimestamp
= getDurationNs(transaction.startSystemTime, reading.absoluteTimestamp);

[timestampNormalizedValues addObject:@{
@"elapsed_since_start_ns" : @(relativeTimestamp).stringValue,
[timestampNormalizedValues addObject:@ {
@"elapsed_since_start_ns" : sentry_stringForUInt64(relativeTimestamp),
@"value" : reading.value
}];
}];
Expand Down
22 changes: 8 additions & 14 deletions Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# import "SentryEnvelope.h"
# import "SentryEnvelopeItemType.h"
# import "SentryEvent+Private.h"
# import "SentryFormatter.h"
# import "SentryFramesTracker.h"
# import "SentryHexAddressFormatter.h"
# import "SentryHub+Private.h"
# import "SentryId.h"
# import "SentryInternalDefines.h"
Expand Down Expand Up @@ -86,11 +86,11 @@
NSMutableDictionary<NSString *, NSNumber *> *frameIndexLookup,
NSMutableDictionary<NSString *, NSNumber *> *stackIndexLookup)
{
const auto threadID = [@(backtrace.threadMetadata.threadID) stringValue];
const auto threadID = sentry_stringForUInt64(backtrace.threadMetadata.threadID);

NSString *queueAddress = nil;
if (backtrace.queueMetadata.address != 0) {
queueAddress = sentry_formatHexAddress(@(backtrace.queueMetadata.address));
queueAddress = sentry_formatHexAddressUInt64(backtrace.queueMetadata.address);
}
NSMutableDictionary<NSString *, id> *metadata = threadMetadata[threadID];
if (metadata == nil) {
Expand Down Expand Up @@ -118,7 +118,7 @@
for (std::vector<uintptr_t>::size_type backtraceAddressIdx = 0;
backtraceAddressIdx < backtrace.addresses.size(); backtraceAddressIdx++) {
const auto instructionAddress
= sentry_formatHexAddress(@(backtrace.addresses[backtraceAddressIdx]));
= sentry_formatHexAddressUInt64(backtrace.addresses[backtraceAddressIdx]);

const auto frameIndex = frameIndexLookup[instructionAddress];
if (frameIndex == nil) {
Expand Down Expand Up @@ -180,12 +180,6 @@
}
}

NSString *
serializedUnsigned64BitInteger(uint64_t value)
{
return [NSString stringWithFormat:@"%llu", value];
}

# if SENTRY_HAS_UIKIT
/**
* Convert the data structure that records timestamps for GPU frame render info from
Expand Down Expand Up @@ -225,7 +219,7 @@
= getDurationNs(relativeFrameRenderStart, relativeFrameRenderEnd);

[relativeFrameInfo addObject:@{
@"elapsed_since_start_ns" : serializedUnsigned64BitInteger(relativeFrameRenderStart),
@"elapsed_since_start_ns" : sentry_stringForUInt64(relativeFrameRenderStart),
@"value" : @(frameRenderDurationNs),
}];
}];
Expand Down Expand Up @@ -255,7 +249,7 @@
const auto relativeTimestamp = getDurationNs(transaction.startSystemTime, timestamp);

[relativeFrameRates addObject:@ {
@"elapsed_since_start_ns" : serializedUnsigned64BitInteger(relativeTimestamp),
@"elapsed_since_start_ns" : sentry_stringForUInt64(relativeTimestamp),
@"value" : refreshRate,
}];
}];
Expand All @@ -279,9 +273,9 @@
return;
}
const auto dict = [NSMutableDictionary dictionaryWithDictionary:@ {
@"elapsed_since_start_ns" : serializedUnsigned64BitInteger(
@"elapsed_since_start_ns" : sentry_stringForUInt64(
getDurationNs(transaction.startSystemTime, sample.absoluteTimestamp)),
@"thread_id" : serializedUnsigned64BitInteger(sample.threadID),
@"thread_id" : sentry_stringForUInt64(sample.threadID),
@"stack_id" : sample.stackIndex,
}];
if (sample.queueAddress) {
Expand Down
43 changes: 43 additions & 0 deletions Sources/Sentry/include/SentryFormatter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#import <Foundation/Foundation.h>

// 2 for the 0x prefix, plus 16 for the hex value, plus 1 for the null terminator
armcknight marked this conversation as resolved.
Show resolved Hide resolved
#define SENTRY_HEX_ADDRESS_LENGTH 19

static inline NSString *
sentry_snprintfHexAddress(uint64_t value)
{
char buffer[SENTRY_HEX_ADDRESS_LENGTH];
snprintf(buffer, SENTRY_HEX_ADDRESS_LENGTH, "0x%016llx", value);
NSString *nsString = [NSString stringWithCString:buffer encoding:NSASCIIStringEncoding];
return nsString;
}

static inline NSString *
sentry_stringForUInt64(uint64_t value)
{
int bufferSize = snprintf(NULL, 0, "%llu", value) + 1;
char *buffer = (char *)malloc(bufferSize);
snprintf(buffer, bufferSize, "%llu", value);
NSString *nsString = [NSString stringWithCString:buffer encoding:NSASCIIStringEncoding];
free(buffer);
return nsString;
}

static inline NSString *
sentry_formatHexAddress(NSNumber *value)
{
/*
* We observed a 41% speedup by using snprintf vs +[NSString stringWithFormat:]. In a trial
* using a profile, we observed the +[NSString stringWithFormat:] using 282ms of CPU time, vs
* 164ms of CPU time for snprintf. There is also an assumed space improvement due to not needing
* to allocate as many instances of NSString, like for the format string literal, instead only
* using stack-bound C strings.
*/
return sentry_snprintfHexAddress([value unsignedLongLongValue]);
}

static inline NSString *
sentry_formatHexAddressUInt64(uint64_t value)
{
return sentry_snprintfHexAddress(value);
}
7 changes: 0 additions & 7 deletions Sources/Sentry/include/SentryHexAddressFormatter.h

This file was deleted.

32 changes: 32 additions & 0 deletions Tests/SentryTests/Helper/SentryFormatterTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import XCTest

final class SentryFormatterTests: XCTestCase {
func testFormatHexAddress() {
for (input, expected) in [
(0x000000008e902bf0, "0x000000008e902bf0"),
(0x000000008fd09c40, "0x000000008fd09c40"),
(0x00000000945b1c00, "0x00000000945b1c00")
] {
XCTAssertEqual(sentry_formatHexAddress(input as NSNumber), expected)
}
}

func testStringForUInt64() {
for (input, expected) in [
(0, "0"),
(1, "1"),
(123_456, "123456"),
(UInt64.max, "18446744073709551615")
] {
XCTAssertEqual(sentry_stringForUInt64(UInt64(input)), expected)
}
}

func testFormatHexAddressPerformance() {
measure {
for _ in 0..<1_000 {
sentry_formatHexAddress(arc4random() as NSNumber)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ class SentryTimeToDisplayTrackerTest: XCTestCase {
fixture.dateProvider.setDate(date: Date(timeIntervalSince1970: 9))

let hub = TestHub(client: SentryClient(options: Options()), andScope: nil)
let tracer = SentryTracer(transactionContext: TransactionContext(operation: "Test Operation"), hub: hub, waitForChildren: true)
let tracer = SentryTracer(transactionContext: TransactionContext(operation: "Test Operation"), hub: hub, configuration: SentryTracerConfiguration(block: { config in
config.waitForChildren = true
}))
let sut = fixture.getSut(for: UIViewController(), waitForFullDisplay: true)

sut.start(for: tracer)
Expand Down
1 change: 1 addition & 0 deletions Tests/SentryTests/SentryTests-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#import "SentryFileIOTrackingIntegration.h"
#import "SentryFileManager+TestProperties.h"
#import "SentryFileManager.h"
#import "SentryFormatter.h"
#import "SentryFrame.h"
#import "SentryFrameRemover.h"
#import "SentryFramesTracker+TestInit.h"
Expand Down