Package testhelper

Class PerformanceUtils


  • public class PerformanceUtils
    extends java.lang.Object
    • Field Detail

      • THREAD_MX_BEAN

        private static final java.lang.management.ThreadMXBean THREAD_MX_BEAN
      • GET_THREAD_ALLOCATED_BYTES

        private static final java.lang.reflect.Method GET_THREAD_ALLOCATED_BYTES
    • Constructor Detail

      • PerformanceUtils

        public PerformanceUtils()
    • Method Detail

      • initGetThreadAllocatedBytes

        private static java.lang.reflect.Method initGetThreadAllocatedBytes()
      • canMeasureAllocatedMemory

        public static boolean canMeasureAllocatedMemory()
      • measureAllocatedMemory

        public static long measureAllocatedMemory()
        Returns:
        amount of memory (in bytes) allocated by current thread until now