gpt4 book ai didi

iPhone 间歇性网络测试

转载 作者:行者123 更新时间:2023-11-28 19:54:56 25 4
gpt4 key购买 nike

我看过“使用有限的网络访问测试 iPhone 应用程序”(link) 问题,虽然这是一个很好的提示,但在测试一段代码的实际性能方面并不是很有帮助。边缘。根据我的经验,网络会随机进入连接状态。我想要一些方法来模拟这个。我在想如何 sqlite自动测试 malloc。

These instrumented mallocs can be set to fail only once and then start working again, or to continue failing after the first failure. OOM tests are done in a loop. On the first iteration of the loop, the instrumented malloc is rigged to fail on the first allocation. Then some SQLite operation is carried out and checks are done to make sure SQLite handled the OOM error correctly. Then the time-to-failure counter on the instrumented malloc is increased by one and the test is repeated. The loop continues until the entire operation runs to completion without ever encountering a simulated OOM failure. Tests like this are run twice, once with the instrumented malloc set to fail only once, and again with the instrumented malloc set to fail continuously after the first failure"

我已经做了一些谷歌搜索,但我想知道是否有一个好的工具可以做到这一点。我想用我的开发机器作为服务器和通过 WiFi 连接的 iPhone 进行模拟。

最佳答案

你可以安装 Apple 的 Network Link Conditioner

优胜美地:

Network Link Conditioner can be found in the "Hardware IO Tools for Xcode" package. This can be downloaded from the Apple Developer Downloads page. Once the download has finished, open the DMG and double-click "Network Link Condition.prefPane" to install (source).

Network Link Conditioner

在旧版本的 OSX 上:

Mountain Lion/Mavericks:Xcode > 打开开发者工具 > 更多开发者工具
Lion:/Developer/Applications/Utilities/Network Link Conditioner

关于iPhone 间歇性网络测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1502060/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com