Class PerfEntry


  • public class PerfEntry
    extends java.lang.Object
    PerfEntry class represents the Performance Entry object.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BEGIN  
      static int END  
      static int NOT_DUAL  
      static int RESULT  
      static int USER  
    • Constructor Summary

      Constructors 
      Constructor Description
      PerfEntry()
      Constructor for the Performance Entry
      PerfEntry​(java.lang.String component)
      Constructor for the Performance Entry-Message mode
      PerfEntry​(java.lang.String component, int dual)
      Constructor for the Performance Entry-BEGIN and END mode
      PerfEntry​(java.lang.String component, long usedTime, long usedMemory, int dual)
      Constructor for the Performance Entry - ALL modes
    • Constructor Detail

      • PerfEntry

        public PerfEntry()
        Constructor for the Performance Entry
      • PerfEntry

        public PerfEntry​(java.lang.String component)
        Constructor for the Performance Entry-Message mode
        Parameters:
        component - The name of the component name.
      • PerfEntry

        public PerfEntry​(java.lang.String component,
                         int dual)
        Constructor for the Performance Entry-BEGIN and END mode
        Parameters:
        component - Component name
        dual - Type of message PerfEntry.BEGIN or PerfEntry.END
      • PerfEntry

        public PerfEntry​(java.lang.String component,
                         long usedTime,
                         long usedMemory,
                         int dual)
        Constructor for the Performance Entry - ALL modes
        Parameters:
        component - Component name
        usedTime - Time
        usedMemory - memory
        dual - type of message PerfEntry.BEGIN or PerfEntry.END
    • Method Detail

      • equalsPerfEntry

        public boolean equalsPerfEntry​(PerfEntry entry)
        Checks if the equality of two PerfEntry objects. Checks if they have the same Component name.
        Parameters:
        entry - PerfEntry object
        Returns:
        true if Components and modes are equal
      • isPair

        public boolean isPair​(PerfEntry entry)
        Checks if the PerfEntry objects are pairs. Checks if they have the same Component name.
        Parameters:
        entry - PerfEntry object
        Returns:
        true if Components are equal
      • diffPerfEntries

        public static PerfEntry diffPerfEntries​(PerfEntry begin,
                                                PerfEntry end)
        Gets the difference of the time stamps and Memory usage of 2 PerfEntry objects.
        Parameters:
        begin - begin PerfEntry object
        end - end PerfEntry object
        Returns:
        PerfEntry object with difference of time stamps and memory usage
      • addPerfEntries

        public static PerfEntry addPerfEntries​(PerfEntry entry1,
                                               PerfEntry entry2)
        Gets the sum of the time stamps and Memory usage of 2 PerfEntry objects.
        Parameters:
        entry1 - PerfEntry object
        entry2 - PerfEntry object
        Returns:
        PerfEntry object with sum of time stamps and memory usage.
      • dumpEntry

        public java.lang.String dumpEntry()
        Dumps the performance Entry Object in display format
        Returns:
        String containing a dump of the entry Object in display format.
      • getPerfEntryStats

        public java.lang.String getPerfEntryStats()
        Gets only the time stamp and memory usage for an entry .
        Returns:
        String containing the time stamp and memory usage.
      • getTimeStamp

        public long getTimeStamp()
        Gets the time stamp of this PerfEntry
        Returns:
        The value of the time stamp.
      • getUsedMemory

        public long getUsedMemory()
        Gets the memory used.
        Returns:
        Returns the memory used.
      • setTimeStamp

        public void setTimeStamp​(long time)
        Sets the time stamp value.
        Parameters:
        time - The time stamp to set.
      • setUsedMemory

        public void setUsedMemory​(long memory)
        Sets the memory used value.
        Parameters:
        memory - The memory used value.
      • getComponent

        public java.lang.String getComponent()
        Method gets the component name.
        Returns:
        Returns a String containing the name of the component.
      • setComponent

        public void setComponent​(java.lang.String string)
        Parameters:
        string -
      • getBaseComponent

        public java.lang.String getBaseComponent()
        Method returns the name of the base component.
        Returns:
        Returns the name of the base component.
      • setBaseComponent

        public void setBaseComponent​(java.lang.String string)
        Sets the name of the base component.
        Parameters:
        string - The base component name to set.
      • getDual

        public int getDual()
        Gets the dual message.
        Returns:
        Returns the dual message.
      • setDual

        public void setDual​(int i)
        Parameters:
        i -