diff --git a/src/main/java/org/opensearch/performanceanalyzer/commons/metrics/AllMetrics.java b/src/main/java/org/opensearch/performanceanalyzer/commons/metrics/AllMetrics.java index 9940cb5..d6d4bda 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/commons/metrics/AllMetrics.java +++ b/src/main/java/org/opensearch/performanceanalyzer/commons/metrics/AllMetrics.java @@ -838,6 +838,208 @@ public static class Constants { } } + public enum SearchBackPressureStatsValue implements MetricValue { + SEARCHBP_MODE(SearchBackPressureStatsValue.Constants.SEARCHBP_MODE), + SEARCHBP_NODEID(SearchBackPressureStatsValue.Constants.SEARCHBP_NODEID), + SEARCHBP_SHARD_STATS_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants.SEARCHBP_SHARD_STATS_CANCELLATIONCOUNT), + SEARCHBP_SHARD_STATS_LIMITREACHEDCOUNT( + SearchBackPressureStatsValue.Constants.SEARCHBP_SHARD_STATS_LIMITREACHEDCOUNT), + SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT), + SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX), + SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG), + SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT), + SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTMAX), + SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTAVG), + SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT), + SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX), + SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG), + SEARCHBP_TASK_STATS_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants.SEARCHBP_TASK_STATS_CANCELLATIONCOUNT), + SEARCHBP_TASK_STATS_LIMITREACHEDCOUNT( + SearchBackPressureStatsValue.Constants.SEARCHBP_TASK_STATS_LIMITREACHEDCOUNT), + SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT), + SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX), + SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG), + SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT), + SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTMAX), + SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTAVG), + SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT), + SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX), + SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG), + SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CANCELLATIONCOUNT), + SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTMAX( + SearchBackPressureStatsValue.Constants + .SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTMAX), + SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTAVG), + SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_ROLLINGAVG( + SearchBackPressureStatsValue.Constants + .SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_ROLLINGAVG), + SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_FRAGMENT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_FRAGMENT), + SEARCHBP_SEARCH_TASK_STATS_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_TASK_STATS_CANCELLATIONCOUNT), + SEARCHBP_SEARCH_TASK_STATS_LIMITREACHEDCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_TASK_STATS_LIMITREACHEDCOUNT), + SEARCHBP_SEARCH_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS), + SEARCHBP_SEARCH_SHARD_TASK_STATS_CANCELLATIONCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_SHARD_TASK_STATS_CANCELLATIONCOUNT), + SEARCHBP_SEARCH_SHARD_TASK_STATS_LIMITREACHEDCOUNT( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_SHARD_TASK_STATS_LIMITREACHEDCOUNT), + SEARCHBP_SEARCH_SHARD_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_SHARD_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS), + SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_SHARD_TASK_STATS( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_SHARD_TASK_STATS), + SEARCHBP_SEARCH_BACK_PRESSURE_STATS_MODE( + SearchBackPressureStatsValue.Constants.SEARCHBP_SEARCH_BACK_PRESSURE_STATS_MODE), + SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_TASK_STATS( + SearchBackPressureStatsValue.Constants + .SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_TASK_STATS); + + private final String value; + + SearchBackPressureStatsValue(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + + public static class Constants { + // SearchBackPressure Metrics + public static final String SEARCHBP_MODE = "searchbp_mode"; + public static final String SEARCHBP_NODEID = "searchbp_nodeid"; + public static final String SEARCHBP_SHARD_STATS_CANCELLATIONCOUNT = + "searchbp_shard_stats_cancellationCount"; + public static final String SEARCHBP_SHARD_STATS_LIMITREACHEDCOUNT = + "searchbp_shard_stats_limitReachedCount"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT = + "searchbp_shard_stats_resource_heap_usage_cancellationCount"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX = + "searchbp_shard_stats_resource_heap_usage_currentMax"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG = + "searchbp_shard_stats_resource_heap_usage_rollingAvg"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT = + "searchbp_shard_stats_resource_cpu_usage_cancellationCount"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTMAX = + "searchbp_shard_stats_resource_cpu_usage_currentMax"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_CPU_USAGE_CURRENTAVG = + "searchbp_shard_stats_resource_cpu_usage_currentAvg"; + public static final String + SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT = + "searchbp_shard_stats_resource_elaspedtime_usage_cancellationCount"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX = + "searchbp_shard_stats_resource_elaspedtime_usage_currentMax"; + public static final String SEARCHBP_SHARD_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG = + "searchbp_shard_stats_resource_elaspedtime_usage_currentAvg"; + public static final String SEARCHBP_TASK_STATS_CANCELLATIONCOUNT = + "searchbp_task_stats_cancellationCount"; + public static final String SEARCHBP_TASK_STATS_LIMITREACHEDCOUNT = + "searchbp_task_stats_limitReachedCount"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CANCELLATIONCOUNT = + "searchbp_task_stats_resource_heap_usage_cancellationCount"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_CURRENTMAX = + "searchbp_task_stats_resource_heap_usage_currentMax"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_HEAP_USAGE_ROLLINGAVG = + "searchbp_task_stats_resource_heap_usage_rollingAvg"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CANCELLATIONCOUNT = + "searchbp_task_stats_resource_cpu_usage_cancellationCount"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTMAX = + "searchbp_task_stats_resource_cpu_usage_currentMax"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_CPU_USAGE_CURRENTAVG = + "searchbp_task_stats_resource_cpu_usage_currentAvg"; + public static final String + SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CANCELLATIONCOUNT = + "searchbp_task_stats_resource_elaspedtime_usage_cancellationCount"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTMAX = + "searchbp_task_stats_resource_elaspedtime_usage_currentMax"; + public static final String SEARCHBP_TASK_STATS_RESOURCE_ELASPEDTIME_USAGE_CURRENTAVG = + "searchbp_task_stats_resource_elaspedtime_usage_currentAvg"; + // ResourceUsageTrackerStats + public static final String SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CANCELLATIONCOUNT = + "cancellationCount"; + public static final String SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTMAX = + "currentMax"; + public static final String SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_CURRENTAVG = + "currentAvg"; + public static final String SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_ROLLINGAVG = + "rollingAvg"; + public static final String SEARCHBP_RESOURCE_USAGE_TRACKER_STATS_FRAGMENT = "fragment"; + // SearchTaskStats + public static final String SEARCHBP_SEARCH_TASK_STATS_CANCELLATIONCOUNT = + "cancellationCount"; + public static final String SEARCHBP_SEARCH_TASK_STATS_LIMITREACHEDCOUNT = + "limitReachedCount"; + public static final String SEARCHBP_SEARCH_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS = + "resourceUsageTrackerStats"; + // SearchShardTaskStats + public static final String SEARCHBP_SEARCH_SHARD_TASK_STATS_CANCELLATIONCOUNT = + "cancellationCount"; + public static final String SEARCHBP_SEARCH_SHARD_TASK_STATS_LIMITREACHEDCOUNT = + "limitReachedCount"; + public static final String + SEARCHBP_SEARCH_SHARD_TASK_STATS_RESOURCE_USAGE_TRACKER_STATS = + "resourceUsageTrackerStats"; + // SearchBackPressureStats + public static final String SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_SHARD_TASK_STATS = + "searchShardTaskStats"; + public static final String SEARCHBP_SEARCH_BACK_PRESSURE_STATS_MODE = "mode"; + public static final String SEARCHBP_SEARCH_BACK_PRESSURE_STATS_SEARCH_TASK_STATS = + "searchTaskStats"; + } + } + public enum ClusterManagerClusterUpdateStatsValue implements MetricValue { PUBLISH_CLUSTER_STATE_LATENCY(Constants.PUBLISH_CLUSTER_STATE_LATENCY), PUBLISH_CLUSTER_STATE_FAILURE(Constants.PUBLISH_CLUSTER_STATE_FAILURE);