How can I write a program which can test throughput of disk in Windows systems using c++?
如何编写可以使用c ++测试Windows系统中磁盘吞吐量的程序?
What's the mainly steps and APIs that I can use to programming?
我可以用来编程的主要步骤和API是什么?
2 个解决方案
#1
One open-source benchmark is bonnie, which mostly uses the standard C API. You'll need to change some of the timing functions to suit Windows.
一个开源基准测试版是bonnie,它主要使用标准的C API。您需要更改一些适合Windows的计时功能。
#2
In outline:
- write a known (large) amount of data to disk ( see write() )
- start clock (see time() or clock() )
- read data from disk (see read() )
- stop clock (see above)
- report results (see cout)
将已知(大量)数据写入磁盘(请参阅write())
开始时钟(见时间()或时钟())
从磁盘读取数据(参见read())
停止时钟(见上文)
报告结果(见cout)
#1
One open-source benchmark is bonnie, which mostly uses the standard C API. You'll need to change some of the timing functions to suit Windows.
一个开源基准测试版是bonnie,它主要使用标准的C API。您需要更改一些适合Windows的计时功能。
#2
In outline:
- write a known (large) amount of data to disk ( see write() )
- start clock (see time() or clock() )
- read data from disk (see read() )
- stop clock (see above)
- report results (see cout)
将已知(大量)数据写入磁盘(请参阅write())
开始时钟(见时间()或时钟())
从磁盘读取数据(参见read())
停止时钟(见上文)
报告结果(见cout)