-
Notifications
You must be signed in to change notification settings - Fork 17
Update CPU, Architecture and OSInfo system attributes #154
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
Conversation
Add OSInfo name, version and buildNumber Add CPU/Device architecture Fix uname machine and model attributes Add isSimulator attribute
result["device.arch"] = CPU.architecture() | ||
result["cpu.arch"] = CPU.architecture() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- why both?
- you don't have any caching here - it means this function will do a lot of stuff twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting both to avoid "Unknown Architecture", device.arch & cpu.arch are the same thing but developers can filter using either one.
@@ -125,6 +127,33 @@ struct SystemControl { | |||
return baseAddress.withMemoryRebound(to: T.self, capacity: 1, { $0.pointee }) | |||
}) | |||
} | |||
|
|||
static func string(forKeys keys: [Int32]) throws -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the point of the string functioN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we can change the function name it would be great.
@@ -125,6 +127,33 @@ struct SystemControl { | |||
return baseAddress.withMemoryRebound(to: T.self, capacity: 1, { $0.pointee }) | |||
}) | |||
} | |||
|
|||
static func string(forKeys keys: [Int32]) throws -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we can change the function name it would be great.
Adds OSInfo name, version and buildNumber
Adds CPU/Device architecture
Fixes Uname .machine and .model attributes
Adds isSimulator attribute
ref: BT-5714