mirror of
https://github.com/kunkunsh/kunkun-ext-disk-speed.git
synced 2025-04-03 18:56:44 +00:00
16 lines
474 B
TypeScript
16 lines
474 B
TypeScript
export type Progress = { totalMB: number; totalDuration: number }
|
|
export interface API {
|
|
sequentialWriteTest: (
|
|
options: {
|
|
filePath: string
|
|
sizeInMB: number
|
|
rounds: number
|
|
bufferSizeMB: number
|
|
keepTheFile?: boolean
|
|
},
|
|
callback?: (progress: Progress) => void
|
|
) => Promise<Progress>
|
|
sequentialReadTest: (filePath: string, options: { deleteAfter: boolean }) => Promise<Progress>
|
|
createEmptyFile: (filePath: string, sizeInMB: number) => Promise<void>
|
|
}
|