我想使用仪器跟踪时间的函数之一中有以下代码行。当我从仪器在模拟器上运行该应用程序时,使用 os_signpost 测量的时间确实显示出来,我可以准确地测量我需要的东西。
Then I switch to device, same code. However, as it runs on device instruments does not show the measured times. It only show this:
os_signpost 时间根本不显示。
所以,在模拟器上一切都很好,但当我切换到我的 iPhone 设备时就不行了。
任何想法?
let spid = OSSignpostID(log: SignpostLog.myLog, object: myObj as AnyObject)
defer { os_signpost(.end, log: SignpostLog.myLog, name: "operation1", signpostID: spid) }
os_signpost(.begin, log: SignpostLog.myLog, name: "operation1", signpostID: spid)
确保您没有禁用OS_ACTIVITY_MODE
通过环境变量(参见下面的屏幕截图)
我删除了它,一切正常=)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)