from tmll.ml.modules.anomaly_detection.memory_leak_detection_module import MemoryLeakDetection
# Initialize the module
mld = MemoryLeakDetection(client, experiment) # Check the Quickstart page to see what are these variables
# Find the memory leaks
leaks = mld.analyze_memory_leaks()
# Plot the memory leaks
mld.plot_memory_leaks_analysis(leaks)from tmll.ml.modules.root_cause.correlation_module import CorrelationAnalysis
# Initialize the module
ca = CorrelationAnalysis(client, experiment, outputs) # Check the Quickstart page to see what are these variables
# Analyze the correlations between components (e.g., CPU and Memory)
correlations = ca.analyze_correlations()
# Plot the correlation matrix
ca.plot_correlation_matrix(correlations)from tmll.ml.modules.performance_trend.change_point_module import ChangePointAnalysis
# Initialize the module
cpa = ChangePointAnalysis(client, experiment, outputs) # Check the Quickstart page to see what are these variables
# Detect the significant change points in the system
change_points = cpa.get_change_points(n_change_points=2, methods=['voting', 'pca'])
# Plot the change points
cpa.plot_change_points(change_points)from tmll.ml.modules.predictive_maintenance.capacity_planning_module import CapacityPlanning
# Initialize the module
cp = CapacityPlanning(client, experiment, outputs) # Check the Quickstart page to see what are these variables
# Forecast the system's metrics
forecasts = cp.forecast_capacity(method='ARIMA', resource_types=['CPU', 'DISK'])
# Plot the forecasts along with the original data
cp.plot_capacity_forecast(forecasts)from tmll.ml.modules.resource_optimization.idle_resource_detection_module import IdleResourceDetection
# Initialize the module
ird = IdleResourceDetection(client, experiment, outputs) # Check the Quickstart page to see what are these variables
# Determine idle resources (if any)
idle_resources = ird.analyze_idle_resources(resource_types=['CPU', 'MEMORY'], cpu_idle_threshold=30, memory_idle_threshold=10*1024*1024)
# Plot the resource utilization with their idle periods (if any)
ird.plot_resource_utilization(idle_resources)






