【问题标题】:Is there a way to read disk access times in python?有没有办法在 python 中读取磁盘访问时间?
【发布时间】:2019-02-20 06:42:10
【问题描述】:

有没有办法在 python 中读取磁盘访问时间?我在 c/c++ 中找到了许多脚本。只是想知道是否有纯 python 或 cython 的。寻找与 WHDD 或 MHDD 类似的功能。

【问题讨论】:

标签: python-3.x


【解决方案1】:

如果是windows你可以右击屏幕底部的栏,选择joblist -> (tab) peformance -> Disc,在这里你会找到disc IE响应时间的基本数据,在底部有还有一个名为“recource survailence”的链接是丹麦语的,如果翻译有误,很抱歉,会有更多数据。

更新

from win32com.client import Dispatch
from time import time

starttime = time()
Dispatch('Scripting.FileSystemObject')
endtime = time() - starttime

print(endtime)

这是我能想出的唯一方法,但我不知道如何逐个部门地做到这一点

【讨论】:

  • 好的。但这是逐扇区扫描吗?这也是我计划开发的未来软件套件。以某种方式需要代码中的结果
猜你喜欢
  • 1970-01-01
  • 2012-01-25
  • 2022-11-13
  • 2019-02-10
  • 1970-01-01
  • 2018-10-01
  • 2011-07-14
  • 1970-01-01
  • 2019-07-10
相关资源
最近更新 更多