1 | package de.uka.ipd.sdq.measurement.strategies.system; |
2 | |
3 | public class Test { |
4 | |
5 | public static void main(String[] args) { |
6 | |
7 | System.out.println(SystemResourcesUtil.getCPUCores()); |
8 | |
9 | System.out.println(SystemResourcesUtil.getFreePhysicalMemorySize()); |
10 | System.out.println(SystemResourcesUtil.getTotalPhysicalMemorySize()); |
11 | |
12 | System.out.println(SystemResourcesUtil.getCPUProcessTime()); |
13 | |
14 | long start = System.currentTimeMillis(); |
15 | |
16 | |
17 | int i = 1; |
18 | while (System.currentTimeMillis() - start < 1000) { |
19 | i ++; |
20 | } |
21 | System.out.println(i); |
22 | |
23 | System.out.println(SystemResourcesUtil.getCPUProcessTime()); |
24 | |
25 | System.out.println(SystemResourcesUtil.getFreeTempDirectorySize() / 1024 / 1024 / 1024); |
26 | |
27 | } |
28 | |
29 | } |