public class MemoryUsageReporter extends AbstractReporter
Constructor and Description |
---|
MemoryUsageReporter() |
Modifier and Type | Method and Description |
---|---|
String |
getAgentHostname()
Gets the agent hostname.
|
String |
getAgentPort()
Gets the agent port.
|
String |
getMemoryDumpFile()
Gets the name of the memory dump file created by PerfCake agent.
|
long |
getMemoryLeakDetectionMonitoringPeriod()
Gets the period in which a memory usage is gathered from the PerfCake agent.
|
double |
getMemoryLeakSlopeThreshold()
Gets the possible memory leak detection threshold.
|
int |
getUsedMemoryTimeWindowSize()
Gets the size of the memory time window (number of latest records) for possible memory leak detection.
|
boolean |
isMemoryDumpOnLeak()
Returns a value of the property to make a memory dump, when possible memory leak is detected.
|
boolean |
isMemoryLeakDetectionEnabled()
Is the possible memory leak detection enabled?
|
boolean |
isPerformGcOnMemoryUsage()
Returns the value of the property that indicate if performing garbage collection (each time the memory usage of the
tested system is measured and published) is enabled or disabled.
|
void |
publishResult(PeriodType periodType,
Destination destination)
Publishes results to the destination.
|
MemoryUsageReporter |
setAgentHostname(String agentHostname)
Sets the agent hostname.
|
MemoryUsageReporter |
setAgentPort(String agentPort)
Sets the agent port.
|
MemoryUsageReporter |
setMemoryDumpFile(String memoryDumpFile)
Sets a the name of the memory dump file created by PerfCake agent.
|
MemoryUsageReporter |
setMemoryDumpOnLeak(boolean memoryDumpOnLeak)
Sets the value of the property to make a memory dump, when possible memory leak is detected.
|
MemoryUsageReporter |
setMemoryLeakDetectionEnabled(boolean memoryLeakDetectionEnabled)
Enables/disables the possible memory leak detection mechanism.
|
MemoryUsageReporter |
setMemoryLeakDetectionMonitoringPeriod(long memoryLeakDetectionMonitoringPeriod)
Sets the period in which a memory usage is gathered from the PerfCake agent.
|
MemoryUsageReporter |
setMemoryLeakSlopeThreshold(double memoryLeakSlopeThreshold)
Sets the possible memory leak detection threshold.
|
MemoryUsageReporter |
setPerformGcOnMemoryUsage(boolean performGcOnMemoryUsage)
Enables/disables garbage collection to be performed each time the memory usage of the
tested system is measured and published.
|
MemoryUsageReporter |
setUsedMemoryTimeWindowSize(int timeWindowSize)
Sets the size of the memory time window (number of latest records) for possible memory leak detection.
|
void |
start()
Starts the reporter.
|
void |
stop()
Stops the reporter.
|
getDestinations, getReportingPeriods, newMeasurement, registerDestination, registerDestination, report, reset, setReportManager, setRunInfo, unregisterDestination
public void start()
Reporter
start
in interface Reporter
start
in class AbstractReporter
public void stop()
Reporter
stop
in interface Reporter
stop
in class AbstractReporter
public void publishResult(PeriodType periodType, Destination destination) throws ReportingException
Reporter
periodType
- A period type that caused the invocation of this method.destination
- A destination to which the result should be reported.ReportingException
- When it was not possible to publish results to the given destination.public String getAgentHostname()
public MemoryUsageReporter setAgentHostname(String agentHostname)
agentHostname
- The agent hostname.public String getAgentPort()
public MemoryUsageReporter setAgentPort(String agentPort)
agentPort
- The agent port.public int getUsedMemoryTimeWindowSize()
public MemoryUsageReporter setUsedMemoryTimeWindowSize(int timeWindowSize)
timeWindowSize
- The used memory time window size.public double getMemoryLeakSlopeThreshold()
public MemoryUsageReporter setMemoryLeakSlopeThreshold(double memoryLeakSlopeThreshold)
memoryLeakSlopeThreshold
- The memory leak slope threshold.public boolean isMemoryLeakDetectionEnabled()
public MemoryUsageReporter setMemoryLeakDetectionEnabled(boolean memoryLeakDetectionEnabled)
memoryLeakDetectionEnabled
- true
to enable memory leak detection mechanism.public long getMemoryLeakDetectionMonitoringPeriod()
public MemoryUsageReporter setMemoryLeakDetectionMonitoringPeriod(long memoryLeakDetectionMonitoringPeriod)
memoryLeakDetectionMonitoringPeriod
- The memory leak detection monitoring period.public String getMemoryDumpFile()
public MemoryUsageReporter setMemoryDumpFile(String memoryDumpFile)
memoryDumpFile
- Memory dump file name.public boolean isMemoryDumpOnLeak()
MemoryUsageReporter
will send a command to PerfCake agent that will create a heap dump.true
if the memory dump on leak is enabled. false
otherwise.public MemoryUsageReporter setMemoryDumpOnLeak(boolean memoryDumpOnLeak)
MemoryUsageReporter
will send a command to PerfCake agent that will create a heap dump.memoryDumpOnLeak
- Enables or disables the memory dump on leak.public boolean isPerformGcOnMemoryUsage()
true
if the garbage collection feature is enabled, false
otherwise.public MemoryUsageReporter setPerformGcOnMemoryUsage(boolean performGcOnMemoryUsage)
Enables/disables garbage collection to be performed each time the memory usage of the tested system is measured and published. Since the garbage collection is CPU intensive operation be careful to enable it and to how often the memory usage is measured because it will have a significant impact on the measured system and naturally the measured results too.
It is disabled by default.
performGcOnMemoryUsage
- true
to enable the feature. The false
otherwise.Copyright © 2010–2017 PerfCake Community. All rights reserved.