ソース公開しますのでやる気のある方はリード測定、ランダムアクセス測定も実装してみるといいかもしれません…。
皆様のスコアお待ちしてます。結果はデスクトップに保存されます。
#uselib "kernel32" #cfunc GetDriveType "GetDriveTypeA" sptr #define DRIVE_FIXED 3 #uselib "winmm" #cfunc timeGetTime "timeGetTime" #define version "1.0" ;スクリーン tTitle = "HSP de ストレージ ベンチ" screen 0,320,240 : title tTitle : result="" pos 10,10 : syscolor 15 : boxf : syscolor 8 mes tTitle + " ver "+version dialog "ルートドライブにテンポラリファイルを作成しますので環境によっては管理者権限が必要かもしれません" ; 変数 sdim hdd_drive,128 ; ハードディスクドライブのルート名 chk_drive = "@:" ; ドライブ ; ハードディスクドライブを探索 for i,65,91,1 poke chk_drive,0,i if(GetDriveType(chk_drive) == DRIVE_FIXED) :hdd_drive += chk_drive+"\n" next ; メモリ確保(300MB) mes "> メモリ確保中(300MB)" mSize = 300 : gosub *MALLOC ; ベンチ実行 mes "> シーケンシャルライト測定中\n" notesel hdd_drive repeat notemax timeBef = timeGetTime() noteget drv,cnt : mes "測定中("+drv+")" : file = drv + "\\bench_tmp" : bsave file, buf : delete file : score = (timeGetTime() - timeBef) result += "("+drv+") "+score+ "ms "+(mSize*1024*1024/score)/1024+"MB/s\n" loop notesel result : notesave dir_desktop + "\\HSP_BenchScore.txt" stop *MALLOC sdim buf,1024*1024*mSize return