We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d2f3e5 commit d1259ceCopy full SHA for d1259ce
benchmark/utils/DriverUtils.swift
@@ -412,9 +412,10 @@ final class TestRunner {
412
private static func getExecutedInstructions() -> UInt64 {
413
if #available(OSX 10.9, iOS 7.0, *) {
414
var u = rusage_info_v4()
415
- let p = UnsafeMutablePointer(&u)
416
- p.withMemoryRebound(to: Optional<rusage_info_t>.self, capacity: 1) { up in
417
- let _ = proc_pid_rusage(getpid(), RUSAGE_INFO_V4, up)
+ withUnsafeMutablePointer(to: &u) { p in
+ p.withMemoryRebound(to: Optional<rusage_info_t>.self, capacity: 1) { up in
+ let _ = proc_pid_rusage(getpid(), RUSAGE_INFO_V4, up)
418
+ }
419
}
420
return u.ri_instructions
421
} else {
0 commit comments