MCPcopy
hub / github.com/oshi/oshi / printMemory

Method printMemory

oshi-core/src/test/java/oshi/SystemInfoTest.java:196–207  ·  view source on GitHub ↗
(GlobalMemory memory)

Source from the content-addressed store, hash-verified

194 }
195
196 private static void printMemory(GlobalMemory memory) {
197 oshi.add("Physical Memory: \n " + memory.toString());
198 VirtualMemory vm = memory.getVirtualMemory();
199 oshi.add("Virtual Memory: \n " + vm.toString());
200 List<PhysicalMemory> pmList = memory.getPhysicalMemory();
201 if (!pmList.isEmpty()) {
202 oshi.add("Physical Memory: ");
203 for (PhysicalMemory pm : pmList) {
204 oshi.add(" " + pm.toString());
205 }
206 }
207 }
208
209 private static void printCpu(CentralProcessor processor) {
210 oshi.add("Context Switches/Interrupts: " + processor.getContextSwitches() + " / " + processor.getInterrupts());

Callers 1

mainMethod · 0.95

Calls 3

getVirtualMemoryMethod · 0.65
getPhysicalMemoryMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected