Skip to content

Commit

Permalink
Revert "Revert "feat: profile concurrent transactions (#2105)" (#2225)"
Browse files Browse the repository at this point in the history
This reverts commit 4c1fab4.
  • Loading branch information
armcknight committed Oct 25, 2022
1 parent 027db8a commit e5c1bb7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@
}
}

namespace {
NSString *
getDeviceModel()
{
utsname info;
if (SENTRY_PROF_LOG_ERRNO(uname(&info)) == 0) {
return [NSString stringWithUTF8String:info.machine];
}
return @"";
}

NSString *
getOSBuildNumber()
{
char str[32];
size_t size = sizeof(str);
int cmd[2] = { CTL_KERN, KERN_OSVERSION };
if (SENTRY_PROF_LOG_ERRNO(sysctl(cmd, sizeof(cmd) / sizeof(*cmd), str, &size, NULL, 0)) == 0) {
return [NSString stringWithUTF8String:str];
}
}

@implementation SentryProfiler {
NSMutableDictionary<NSString *, id> *_profile;
uint64_t _startTimestamp;
Expand Down

0 comments on commit e5c1bb7

Please sign in to comment.