small buff
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -379,12 +379,23 @@ int main(int argc, char **argv) {
|
||||
const char * const testDriveData =
|
||||
"local g, s, d = component.list('gpu')(), component.list('screen')(), component.list('drive')()\n"
|
||||
"component.invoke(g, 'bind', s, true)\n"
|
||||
"component.invoke(g, 'set', 1, 1, 'starting...')\n"
|
||||
"component.invoke(g, 'set', 1, 1, 'starting sequential bench...')\n"
|
||||
"local start = computer.uptime()\n"
|
||||
"local cap = component.invoke(d, 'getCapacity')\n"
|
||||
"local bc = component.invoke(d, 'getCapacity') / component.invoke(d, 'getSectorSize')\n"
|
||||
"for i=1,bc do component.invoke(d, 'readSector', i) end\n"
|
||||
"local now = computer.uptime()\n"
|
||||
"component.invoke(g, 'set', 1, 2, 'took ' .. (now - start) .. 's')\n"
|
||||
"component.invoke(g, 'set', 1, 3, 'sequential read speed: ' .. (cap / (now - start)) .. 'B/s')\n"
|
||||
"while computer.uptime() < now + 3 do computer.pullSignal(0.05) end\n"
|
||||
"component.invoke(g, 'bind', s, true)\n"
|
||||
"component.invoke(g, 'set', 1, 1, 'starting random bench...')\n"
|
||||
"start = computer.uptime()\n"
|
||||
"local shortcut = 4\n"
|
||||
"for i=1,bc/shortcut do local i = math.random(1, bc) component.invoke(d, 'readSector', i) end\n"
|
||||
"now = computer.uptime()\n"
|
||||
"component.invoke(g, 'set', 1, 2, 'took ' .. (now - start) .. 's')\n"
|
||||
"component.invoke(g, 'set', 1, 3, 'random read speed: ' .. (cap / shortcut / (now - start)) .. 'B/s')\n"
|
||||
"while computer.uptime() < now + 3 do computer.pullSignal(0.05) end\n"
|
||||
"computer.shutdown(true)\n"
|
||||
;
|
||||
|
||||
@@ -2465,8 +2465,8 @@ const nn_Drive nn_defaultDrives[4] = {
|
||||
.sectorSize = 512,
|
||||
.platterCount = 16,
|
||||
.cacheLineSize = 8,
|
||||
.readsPerTick = 40,
|
||||
.writesPerTick = 20,
|
||||
.readsPerTick = 60,
|
||||
.writesPerTick = 30,
|
||||
.rpm = 7200,
|
||||
.onlySpinForwards = false,
|
||||
.dataEnergyCost = 2048.0 / NN_MiB,
|
||||
|
||||
Reference in New Issue
Block a user