Package com.ibm.di.performance
Class PerfEntry
- java.lang.Object
-
- com.ibm.di.performance.PerfEntry
-
public class PerfEntry extends java.lang.Object
PerfEntry class represents the Performance Entry object.
-
-
Constructor Summary
Constructors Constructor Description PerfEntry()
Constructor for the Performance EntryPerfEntry(java.lang.String component)
Constructor for the Performance Entry-Message modePerfEntry(java.lang.String component, int dual)
Constructor for the Performance Entry-BEGIN and END modePerfEntry(java.lang.String component, long usedTime, long usedMemory, int dual)
Constructor for the Performance Entry - ALL modes
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PerfEntry
addPerfEntries(PerfEntry entry1, PerfEntry entry2)
Gets the sum of the time stamps and Memory usage of 2 PerfEntry objects.static PerfEntry
diffPerfEntries(PerfEntry begin, PerfEntry end)
Gets the difference of the time stamps and Memory usage of 2 PerfEntry objects.java.lang.String
dumpEntry()
Dumps the performance Entry Object in display formatboolean
equalsPerfEntry(PerfEntry entry)
Checks if the equality of two PerfEntry objects.java.lang.String
getBaseComponent()
Method returns the name of the base component.java.lang.String
getComponent()
Method gets the component name.int
getDual()
Gets the dual message.java.lang.String
getPerfEntryStats()
Gets only the time stamp and memory usage for an entry .long
getTimeStamp()
Gets the time stamp of this PerfEntrylong
getUsedMemory()
Gets the memory used.boolean
isPair(PerfEntry entry)
Checks if the PerfEntry objects are pairs.void
setBaseComponent(java.lang.String string)
Sets the name of the base component.void
setComponent(java.lang.String string)
void
setDual(int i)
void
setTimeStamp(long time)
Sets the time stamp value.void
setUsedMemory(long memory)
Sets the memory used value.
-
-
-
Field Detail
-
BEGIN
public static final int BEGIN
- See Also:
- Constant Field Values
-
END
public static final int END
- See Also:
- Constant Field Values
-
NOT_DUAL
public static final int NOT_DUAL
- See Also:
- Constant Field Values
-
RESULT
public static final int RESULT
- See Also:
- Constant Field Values
-
USER
public static final int USER
- See Also:
- Constant Field Values
-
-
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 namedual
- 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 nameusedTime
- TimeusedMemory
- memorydual
- 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 objectend
- 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 objectentry2
- 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
-
-
-