Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何可可 API 或开源库使我能够检查 OS X 中的磁盘读/写速度?
类似于这个应用程序(在 Mac App Store 中)使用的东西。
据我所知,该应用程序写入和读取已知数量的数据(用户从 1、2、3、4 和 5 GB 中选择)并计算所需时间。
我想“实时”读/写时间基于运行平均值:“在最后 5 秒内,我写了 XXX MB”。
我不知道有一个 API 可以自己实现这样的事情,但你可以很容易地做到这一点:生成已知数量的垃圾(例如 500MB 的随机数),将其写入临时文件夹,计时,进行计算,然后清理写入的数据。