Package jetbrains.buildServer.diagnostic
Class MemoryUsageMonitor
- java.lang.Object
-
- jetbrains.buildServer.diagnostic.MemoryUsageMonitor
-
public class MemoryUsageMonitor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MemoryUsageMonitor.MemoryUsageNotificationListener
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MemoryUsageMonitor(TimeService timeService, ServerMetrics serverMetrics)
-
Method Summary
-
-
-
Field Detail
-
TEAMCITY_HIGH_MEMORY_USAGE_POOLS_NAMES_PROPKEY
public static final String TEAMCITY_HIGH_MEMORY_USAGE_POOLS_NAMES_PROPKEY
- See Also:
- Constant Field Values
-
FULL_GC_LOG_THRESHOLD_MS
public static final String FULL_GC_LOG_THRESHOLD_MS
- See Also:
- Constant Field Values
-
TIMESTAMP_KEY
public static final String TIMESTAMP_KEY
- See Also:
- Constant Field Values
-
JAVA_PROCESS_CPU_USAGE_KEY
public static final String JAVA_PROCESS_CPU_USAGE_KEY
- See Also:
- Constant Field Values
-
SYSTEM_LOAD_KEY
public static final String SYSTEM_LOAD_KEY
- See Also:
- Constant Field Values
-
SYSTEM_CPU_USAGE_KEY
public static final String SYSTEM_CPU_USAGE_KEY
- See Also:
- Constant Field Values
-
STAMP_DURATION_KEY
public static final String STAMP_DURATION_KEY
- See Also:
- Constant Field Values
-
GC_USAGE_KEY
public static final String GC_USAGE_KEY
- See Also:
- Constant Field Values
-
TOTAL_GC_THRESHOLD_EXCEEDED_ERROR_KEY
public static final String TOTAL_GC_THRESHOLD_EXCEEDED_ERROR_KEY
- See Also:
- Constant Field Values
-
HIGH_TOTAL_MEMORY
public static final String HIGH_TOTAL_MEMORY
- See Also:
- Constant Field Values
-
OVERALL_GC_USAGE_EXCEEDED
public static final String OVERALL_GC_USAGE_EXCEEDED
- See Also:
- Constant Field Values
-
HIGH_MEMORY_USAGE_ON
public static final String HIGH_MEMORY_USAGE_ON
- See Also:
- Constant Field Values
-
MEMORY_USAGE_WATCHER_THREAD_NAME
public static final String MEMORY_USAGE_WATCHER_THREAD_NAME
- See Also:
- Constant Field Values
-
ourGetProcessCpuTime
@Nullable protected static Method ourGetProcessCpuTime
-
ourGetSystemCpuLoad
@Nullable protected static Method ourGetSystemCpuLoad
-
ourGarbageCollectionNotificationInfo_from
protected static Method ourGarbageCollectionNotificationInfo_from
-
ourGarbageCollectionNotificationInfo_getGcAction
protected static Method ourGarbageCollectionNotificationInfo_getGcAction
-
ourGarbageCollectionNotificationInfo_getGcInfo
protected static Method ourGarbageCollectionNotificationInfo_getGcInfo
-
ourGarbageCollectionNotificationInfo_getGcCause
protected static Method ourGarbageCollectionNotificationInfo_getGcCause
-
ourGcInfo_getMemoryUsageAfterGc
protected static Method ourGcInfo_getMemoryUsageAfterGc
-
ourGcInfo_getMemoryUsageBeforeGc
protected static Method ourGcInfo_getMemoryUsageBeforeGc
-
ourGcInfo_getGcDuration
protected static Method ourGcInfo_getGcDuration
-
isGcEventListenerInitialized
protected static boolean isGcEventListenerInitialized
-
-
Constructor Detail
-
MemoryUsageMonitor
public MemoryUsageMonitor(@NotNull TimeService timeService, @NotNull ServerMetrics serverMetrics)
-
-
Method Detail
-
addListener
public void addListener(@NotNull MemoryUsageMonitor.MemoryUsageNotificationListener listener)
-
startWatcher
public void startWatcher()
-
stopWatcher
public void stopWatcher()
-
getDataHolder
public ServerStatisticsDataHolder getDataHolder()
-
getStatisticsCalculationTimeMinutes
public int getStatisticsCalculationTimeMinutes()
-
getTrackedPoolNames
public String[] getTrackedPoolNames()
-
isGcListenerInitialized
public static boolean isGcListenerInitialized()
-
handleMemoryUsage
protected void handleMemoryUsage(String poolName, MemoryUsage usage, float averageUsage)
-
handleMemoryUsage
protected void handleMemoryUsage(String poolName, MemoryUsage usage, float averageUsage, boolean clearOnly)
-
handleTotalMemoryUsage
protected void handleTotalMemoryUsage(long maxAvailable, float averageMemoryUsagePercent, float averageGCUsage)
-
handleGCLoad
protected void handleGCLoad(long maxAvailable)
-
getTotalGcCount
public long getTotalGcCount()
-
getTotalGcDuration
public long getTotalGcDuration()
-
getLastGcDuration
public long getLastGcDuration()
-
getLastGcTime
public long getLastGcTime()
-
getLastGcEfficiency
public long getLastGcEfficiency()
-
getGcLoadAverage
public float getGcLoadAverage(long since)
-
getGcEfficiencyAverage
public long getGcEfficiencyAverage(long since)
-
getGcDurationAverage
public long getGcDurationAverage(long since)
-
getGcCount
public long getGcCount(long since)
-
-