All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.computeoptimizer.model.ProjectedMetric Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Compute Optimizer module holds the client classes that are used for communicating with AWS Compute Optimizer Service

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.computeoptimizer.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a projected utilization metric of a recommendation option, such as an Amazon EC2 instance. This represents * the projected utilization of a recommendation option had you used that resource during the analyzed period. *

*

* Compare the utilization metric data of your resource against its projected utilization metric data to determine the * performance difference between your current resource and the recommended option. *

* *

* The Cpu, Memory, GPU, and GPU_MEMORY metrics are the only * projected utilization metrics returned when you run the GetEC2RecommendationProjectedMetrics action. * Additionally, these metrics are only returned for resources with the unified CloudWatch agent installed on them. For * more information, see Enabling Memory Utilization with * the CloudWatch Agent and Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

*
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProjectedMetric implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the projected utilization metric. *

*

* The following projected utilization metrics are returned: *

*
    *
  • *

    * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

    *

    * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when * the instance is not allocated a full processor core. *

    *
  • *
  • *

    * Memory - The percentage of memory that would be in use on the recommendation option had you used * that resource during the analyzed period. This metric identifies the amount of memory required to run an * application on the recommendation option. *

    *

    * Units: Percent *

    * *

    * The Memory metric is only returned for resources with the unified CloudWatch agent installed on * them. For more information, see Enabling Memory Utilization * with the CloudWatch Agent. *

    *
  • *
  • *

    * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

    *
  • *
  • *

    * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to * Compute Optimizer's recommendation option. *

    * *

    * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

    *
  • *
*/ private String name; /** *

* The timestamps of the projected utilization metric. *

*/ private java.util.List timestamps; /** *

* The values of the projected utilization metrics. *

*/ private java.util.List values; /** *

* The name of the projected utilization metric. *

*

* The following projected utilization metrics are returned: *

*
    *
  • *

    * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

    *

    * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when * the instance is not allocated a full processor core. *

    *
  • *
  • *

    * Memory - The percentage of memory that would be in use on the recommendation option had you used * that resource during the analyzed period. This metric identifies the amount of memory required to run an * application on the recommendation option. *

    *

    * Units: Percent *

    * *

    * The Memory metric is only returned for resources with the unified CloudWatch agent installed on * them. For more information, see Enabling Memory Utilization * with the CloudWatch Agent. *

    *
  • *
  • *

    * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

    *
  • *
  • *

    * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to * Compute Optimizer's recommendation option. *

    * *

    * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

    *
  • *
* * @param name * The name of the projected utilization metric.

*

* The following projected utilization metrics are returned: *

*
    *
  • *

    * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

    *

    * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch * when the instance is not allocated a full processor core. *

    *
  • *
  • *

    * Memory - The percentage of memory that would be in use on the recommendation option had you * used that resource during the analyzed period. This metric identifies the amount of memory required to run * an application on the recommendation option. *

    *

    * Units: Percent *

    * *

    * The Memory metric is only returned for resources with the unified CloudWatch agent installed * on them. For more information, see Enabling Memory * Utilization with the CloudWatch Agent. *

    *
  • *
  • *

    * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

    *
  • *
  • *

    * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations * to Compute Optimizer's recommendation option. *

    * *

    * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling * NVIDIA GPU utilization with the CloudWatch Agent. *

    *
  • * @see MetricName */ public void setName(String name) { this.name = name; } /** *

    * The name of the projected utilization metric. *

    *

    * The following projected utilization metrics are returned: *

    *
      *
    • *

      * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

      *

      * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when * the instance is not allocated a full processor core. *

      *
    • *
    • *

      * Memory - The percentage of memory that would be in use on the recommendation option had you used * that resource during the analyzed period. This metric identifies the amount of memory required to run an * application on the recommendation option. *

      *

      * Units: Percent *

      * *

      * The Memory metric is only returned for resources with the unified CloudWatch agent installed on * them. For more information, see Enabling Memory Utilization * with the CloudWatch Agent. *

      *
    • *
    • *

      * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

      *
    • *
    • *

      * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to * Compute Optimizer's recommendation option. *

      * *

      * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

      *
    • *
    * * @return The name of the projected utilization metric.

    *

    * The following projected utilization metrics are returned: *

    *
      *
    • *

      * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

      *

      * Depending on the instance type, tools in your operating system can show a lower percentage than * CloudWatch when the instance is not allocated a full processor core. *

      *
    • *
    • *

      * Memory - The percentage of memory that would be in use on the recommendation option had you * used that resource during the analyzed period. This metric identifies the amount of memory required to * run an application on the recommendation option. *

      *

      * Units: Percent *

      * *

      * The Memory metric is only returned for resources with the unified CloudWatch agent installed * on them. For more information, see Enabling Memory * Utilization with the CloudWatch Agent. *

      *
    • *
    • *

      * GPU - The projected percentage of allocated GPUs if you adjust your configurations to * Compute Optimizer's recommendation option. *

      *
    • *
    • *

      * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations * to Compute Optimizer's recommendation option. *

      * *

      * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling * NVIDIA GPU utilization with the CloudWatch Agent. *

      *
    • * @see MetricName */ public String getName() { return this.name; } /** *

      * The name of the projected utilization metric. *

      *

      * The following projected utilization metrics are returned: *

      *
        *
      • *

        * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

        *

        * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when * the instance is not allocated a full processor core. *

        *
      • *
      • *

        * Memory - The percentage of memory that would be in use on the recommendation option had you used * that resource during the analyzed period. This metric identifies the amount of memory required to run an * application on the recommendation option. *

        *

        * Units: Percent *

        * *

        * The Memory metric is only returned for resources with the unified CloudWatch agent installed on * them. For more information, see Enabling Memory Utilization * with the CloudWatch Agent. *

        *
      • *
      • *

        * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

        *
      • *
      • *

        * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to * Compute Optimizer's recommendation option. *

        * *

        * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

        *
      • *
      * * @param name * The name of the projected utilization metric.

      *

      * The following projected utilization metrics are returned: *

      *
        *
      • *

        * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

        *

        * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch * when the instance is not allocated a full processor core. *

        *
      • *
      • *

        * Memory - The percentage of memory that would be in use on the recommendation option had you * used that resource during the analyzed period. This metric identifies the amount of memory required to run * an application on the recommendation option. *

        *

        * Units: Percent *

        * *

        * The Memory metric is only returned for resources with the unified CloudWatch agent installed * on them. For more information, see Enabling Memory * Utilization with the CloudWatch Agent. *

        *
      • *
      • *

        * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

        *
      • *
      • *

        * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations * to Compute Optimizer's recommendation option. *

        * *

        * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling * NVIDIA GPU utilization with the CloudWatch Agent. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see MetricName */ public ProjectedMetric withName(String name) { setName(name); return this; } /** *

        * The name of the projected utilization metric. *

        *

        * The following projected utilization metrics are returned: *

        *
          *
        • *

          * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

          *

          * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when * the instance is not allocated a full processor core. *

          *
        • *
        • *

          * Memory - The percentage of memory that would be in use on the recommendation option had you used * that resource during the analyzed period. This metric identifies the amount of memory required to run an * application on the recommendation option. *

          *

          * Units: Percent *

          * *

          * The Memory metric is only returned for resources with the unified CloudWatch agent installed on * them. For more information, see Enabling Memory Utilization * with the CloudWatch Agent. *

          *
        • *
        • *

          * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

          *
        • *
        • *

          * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to * Compute Optimizer's recommendation option. *

          * *

          * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU * utilization with the CloudWatch Agent. *

          *
        • *
        * * @param name * The name of the projected utilization metric.

        *

        * The following projected utilization metrics are returned: *

        *
          *
        • *

          * Cpu - The projected percentage of allocated EC2 compute units that would be in use on the * recommendation option had you used that resource during the analyzed period. This metric identifies the * processing power required to run an application on the recommendation option. *

          *

          * Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch * when the instance is not allocated a full processor core. *

          *
        • *
        • *

          * Memory - The percentage of memory that would be in use on the recommendation option had you * used that resource during the analyzed period. This metric identifies the amount of memory required to run * an application on the recommendation option. *

          *

          * Units: Percent *

          * *

          * The Memory metric is only returned for resources with the unified CloudWatch agent installed * on them. For more information, see Enabling Memory * Utilization with the CloudWatch Agent. *

          *
        • *
        • *

          * GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute * Optimizer's recommendation option. *

          *
        • *
        • *

          * GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations * to Compute Optimizer's recommendation option. *

          * *

          * The GPU and GPU_MEMORY metrics are only returned for resources with the unified * CloudWatch Agent installed on them. For more information, see Enabling * NVIDIA GPU utilization with the CloudWatch Agent. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see MetricName */ public ProjectedMetric withName(MetricName name) { this.name = name.toString(); return this; } /** *

          * The timestamps of the projected utilization metric. *

          * * @return The timestamps of the projected utilization metric. */ public java.util.List getTimestamps() { return timestamps; } /** *

          * The timestamps of the projected utilization metric. *

          * * @param timestamps * The timestamps of the projected utilization metric. */ public void setTimestamps(java.util.Collection timestamps) { if (timestamps == null) { this.timestamps = null; return; } this.timestamps = new java.util.ArrayList(timestamps); } /** *

          * The timestamps of the projected utilization metric. *

          *

          * NOTE: This method appends the values to the existing list (if any). Use * {@link #setTimestamps(java.util.Collection)} or {@link #withTimestamps(java.util.Collection)} if you want to * override the existing values. *

          * * @param timestamps * The timestamps of the projected utilization metric. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectedMetric withTimestamps(java.util.Date... timestamps) { if (this.timestamps == null) { setTimestamps(new java.util.ArrayList(timestamps.length)); } for (java.util.Date ele : timestamps) { this.timestamps.add(ele); } return this; } /** *

          * The timestamps of the projected utilization metric. *

          * * @param timestamps * The timestamps of the projected utilization metric. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectedMetric withTimestamps(java.util.Collection timestamps) { setTimestamps(timestamps); return this; } /** *

          * The values of the projected utilization metrics. *

          * * @return The values of the projected utilization metrics. */ public java.util.List getValues() { return values; } /** *

          * The values of the projected utilization metrics. *

          * * @param values * The values of the projected utilization metrics. */ public void setValues(java.util.Collection values) { if (values == null) { this.values = null; return; } this.values = new java.util.ArrayList(values); } /** *

          * The values of the projected utilization metrics. *

          *

          * NOTE: This method appends the values to the existing list (if any). Use * {@link #setValues(java.util.Collection)} or {@link #withValues(java.util.Collection)} if you want to override the * existing values. *

          * * @param values * The values of the projected utilization metrics. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectedMetric withValues(Double... values) { if (this.values == null) { setValues(new java.util.ArrayList(values.length)); } for (Double ele : values) { this.values.add(ele); } return this; } /** *

          * The values of the projected utilization metrics. *

          * * @param values * The values of the projected utilization metrics. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectedMetric withValues(java.util.Collection values) { setValues(values); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getTimestamps() != null) sb.append("Timestamps: ").append(getTimestamps()).append(","); if (getValues() != null) sb.append("Values: ").append(getValues()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProjectedMetric == false) return false; ProjectedMetric other = (ProjectedMetric) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getTimestamps() == null ^ this.getTimestamps() == null) return false; if (other.getTimestamps() != null && other.getTimestamps().equals(this.getTimestamps()) == false) return false; if (other.getValues() == null ^ this.getValues() == null) return false; if (other.getValues() != null && other.getValues().equals(this.getValues()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getTimestamps() == null) ? 0 : getTimestamps().hashCode()); hashCode = prime * hashCode + ((getValues() == null) ? 0 : getValues().hashCode()); return hashCode; } @Override public ProjectedMetric clone() { try { return (ProjectedMetric) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.computeoptimizer.model.transform.ProjectedMetricMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy