apex-core
Various Java utilities
Apex-java
Various utilities helping operating in Java on a daily basis.
Standard helpers
GCInspector is drop-in class providing standard logs related to GC activity
@Bean
public IApexThreadDumper apexThreadDumper() {
return new ApexThreadDump(ManagementFactory.getThreadMXBean());
}
@Bean
public GCInspector gcInspector(IApexThreadDumper apexThreadDumper) {
return new GCInspector(apexThreadDumper);
}
ApexLogHelper helps publishing relevant logs regarding memory and timings
Assert.assertEquals("0.09%", ApexLogHelper.getNicePercentage(123, 123456).toString());
Assert.assertEquals("9sec 600ms", ApexLogHelper.getNiceTime(9600).toString());
Assert.assertEquals("2min 11sec", ApexLogHelper.getNiceTime(131, TimeUnit.SECONDS).toString());
Assert.assertEquals("789B", ApexLogHelper.getNiceMemory(789L).toString());
Assert.assertEquals("607KB", ApexLogHelper.getNiceMemory(789L * 789).toString());
Assert.assertEquals("468MB", ApexLogHelper.getNiceMemory(789L * 789 * 789).toString());
Assert.assertEquals("360GB", ApexLogHelper.getNiceMemory(789L * 789 * 789 * 789).toString());
Assert.assertEquals("278TB", ApexLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789).toString());
Assert.assertEquals("214PB", ApexLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789 * 789).toString());
Fancy helpers
ObjectInputHandlingInputStream enables transmitting a raw InputStream through an ObjectInput
ApexCartesianProductHelper helps computing covering cartesian products over sets defined by Collections and Maps.
ApexProcessHelper enables tracking the memory consumption of a process (would it be current JVM, a forked Process or any other process).
ApexProcessHelper.getProcessResidentMemory(processPID)
Apex-MAT
A fork from Eclipse MAT for HeapDump analysis. It improves original MAT by lowering the heap required to prepare MAT index files, while keeping the produced indexes compatible with the original MAT.
Original work: https://git.eclipse.org/c/mat/org.eclipse.mat.git