()
| 36 | downloadsDir = dir; |
| 37 | } |
| 38 | public static String getHWInfo() { |
| 39 | Runtime runtime = Runtime.getRuntime(); |
| 40 | StringBuilder sb = new StringBuilder(); |
| 41 | sb.append("##########################################"); |
| 42 | sb.append("\nAPP: Forge v.").append(getInterface().getCurrentVersion()); |
| 43 | if (hwInfo != null) { |
| 44 | sb.append("\nDEV: ").append(hwInfo.device().getName()); |
| 45 | sb.append(hwInfo.getChipset() |
| 46 | ? "\nSOC: " + hwInfo.device().getChipset() |
| 47 | : "\nCPU: " + hwInfo.device().getCpuDescription()); |
| 48 | sb.append("\nRAM: ").append(hwInfo.getTotalRam()).append(" MB"); |
| 49 | sb.append("\nOS: ").append(hwInfo.os().getRawDescription()); |
| 50 | } else { |
| 51 | sb.append("\nJava: ").append(System.getProperty("java.version")) |
| 52 | .append(" (").append(System.getProperty("java.vendor")).append(")"); |
| 53 | sb.append("\nOS: ").append(System.getProperty("os.name")) |
| 54 | .append(" ").append(System.getProperty("os.version")) |
| 55 | .append(" ").append(System.getProperty("os.arch")); |
| 56 | sb.append("\nRAM: ").append(runtime.maxMemory() / 1024 / 1024) |
| 57 | .append(" MB max, ").append(runtime.availableProcessors()).append(" CPUs"); |
| 58 | } |
| 59 | sb.append("\n##########################################"); |
| 60 | return sb.toString(); |
| 61 | } |
| 62 | public static void logHWInfo() { |
| 63 | for (String line : getHWInfo().split("\n")) { |
| 64 | Logger.info(line); |
no test coverage detected