Download Jar. Uses 11569K of libraries. Click here for Pure Java version (6786L/48K).
1 | !7 |
2 | |
3 | p-experiment { |
4 | wordWrapConsole(); |
5 | |
6 | L<HWDiskStore> l = oshi_diskStores(); |
7 | int i = 0; |
8 | for (HWDiskStore disk : l) { |
9 | print(); |
10 | print("Testing disk " + (++i) + "/" + l(l)); |
11 | print(); |
12 | printStruct("Disk specs", mapPlus(callGetters(disk, 'name, 'model, 'serial, 'size, 'reads, 'readBytes, 'writes, 'writeBytes, 'transferTime, 'timeStamp), partitions := l(disk.getPartitions()))); |
13 | |
14 | pcall-short { |
15 | long oldReads = disk.getReads(); |
16 | long oldReadBytes = disk.getReadBytes(); |
17 | assertTrue("update disk stats", disk.updateDiskStats()); |
18 | assertTrue(print("new reads", disk.getReads()) >= print("old reads", oldReads)); |
19 | assertTrue(print("new read bytes", disk.getReadBytes()) >= print("old read bytes", oldReadBytes)); |
20 | print("Sanity test OK"); |
21 | } |
22 | } |
23 | } |
Began life as a copy of #1016257
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016259 |
Snippet name: | Test oshi Disk Stores Read Bytes Sanity |
Eternal ID of this version: | #1016259/6 |
Text MD5: | cebe24212d08ad6eda13d448e236bcac |
Transpilation MD5: | 2d49350e359104216b5fb9f1b5b17ee1 |
Author: | stefan |
Category: | javax / os |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-12 15:24:35 |
Source code size: | 828 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 414 / 1005 |
Version history: | 5 change(s) |
Referenced in: | [show references] |