Download Jar. Uses 8038K of libraries. Click here for Pure Java version (1201L/8K).
1 | !7 |
2 | |
3 | p {
|
4 | OSProcess process = null; |
5 | repeat 5 { time "oshi_operatingSystem" { oshi_operatingSystem(); }}
|
6 | repeat 5 { time "oshi_currentProcess" { process = oshi_currentProcess(); }}
|
7 | while licensed {
|
8 | time "getResidentSetSize" {
|
9 | long size = process.getResidentSetSize(); |
10 | } |
11 | time "oshi_currentProcessResidentSize" {
|
12 | long actualSize = oshi_currentProcessResidentSize(); |
13 | } |
14 | print ((size == actualSize? "OK" : "DIFF " + (actualSize-size)) + " - " + actualSize); |
15 | sleepSeconds(3); |
16 | } |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): cfunsshuasjs, mqqgnosmbjvj, tvejysmllsmz
No comments. add comment
| Snippet ID: | #1015967 |
| Snippet name: | Try caching OSHI results (OK - i.e., you can't cache the process object) |
| Eternal ID of this version: | #1015967/9 |
| Text MD5: | 3c59ff831a32a885af2b3de3739c2b46 |
| Transpilation MD5: | b6a1f2d75240f833deb35439b1346034 |
| Author: | stefan |
| Category: | javax / os |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | Yes |
| Created/modified: | 2018-06-02 13:29:42 |
| Source code size: | 532 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 857 / 1943 |
| Version history: | 8 change(s) |
| Referenced in: | [show references] |