Class PerformanceStats.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder>
com.google.cloud.gkerecommender.v1.PerformanceStats.Builder
All Implemented Interfaces:
PerformanceStatsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PerformanceStats

public static final class PerformanceStats.Builder extends com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder> implements PerformanceStatsOrBuilder
 Performance statistics for a model deployment.
 
Protobuf type google.cloud.gkerecommender.v1.PerformanceStats
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder>
    • clear

      public PerformanceStats.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder>
    • getDefaultInstanceForType

      public PerformanceStats getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PerformanceStats build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PerformanceStats buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PerformanceStats.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PerformanceStats.Builder>
    • mergeFrom

      public PerformanceStats.Builder mergeFrom(PerformanceStats other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PerformanceStats.Builder>
    • mergeFrom

      public PerformanceStats.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PerformanceStats.Builder>
      Throws:
      IOException
    • getQueriesPerSecond

      public float getQueriesPerSecond()
       Output only. The number of queries per second.
       Note: This metric can vary widely based on context length and may not be a
       reliable measure of LLM throughput.
       
      float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getQueriesPerSecond in interface PerformanceStatsOrBuilder
      Returns:
      The queriesPerSecond.
    • setQueriesPerSecond

      public PerformanceStats.Builder setQueriesPerSecond(float value)
       Output only. The number of queries per second.
       Note: This metric can vary widely based on context length and may not be a
       reliable measure of LLM throughput.
       
      float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The queriesPerSecond to set.
      Returns:
      This builder for chaining.
    • clearQueriesPerSecond

      public PerformanceStats.Builder clearQueriesPerSecond()
       Output only. The number of queries per second.
       Note: This metric can vary widely based on context length and may not be a
       reliable measure of LLM throughput.
       
      float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getOutputTokensPerSecond

      public int getOutputTokensPerSecond()
       Output only. The number of output tokens per second. This is the throughput
       measured as total_output_tokens_generated_by_server /
       elapsed_time_in_seconds.
       
      int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getOutputTokensPerSecond in interface PerformanceStatsOrBuilder
      Returns:
      The outputTokensPerSecond.
    • setOutputTokensPerSecond

      public PerformanceStats.Builder setOutputTokensPerSecond(int value)
       Output only. The number of output tokens per second. This is the throughput
       measured as total_output_tokens_generated_by_server /
       elapsed_time_in_seconds.
       
      int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The outputTokensPerSecond to set.
      Returns:
      This builder for chaining.
    • clearOutputTokensPerSecond

      public PerformanceStats.Builder clearOutputTokensPerSecond()
       Output only. The number of output tokens per second. This is the throughput
       measured as total_output_tokens_generated_by_server /
       elapsed_time_in_seconds.
       
      int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getNtpotMilliseconds

      public int getNtpotMilliseconds()
       Output only. The Normalized Time Per Output Token (NTPOT) in milliseconds.
       This is the request latency normalized by the number of output tokens,
       measured as request_latency / total_output_tokens.
       
      int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNtpotMilliseconds in interface PerformanceStatsOrBuilder
      Returns:
      The ntpotMilliseconds.
    • setNtpotMilliseconds

      public PerformanceStats.Builder setNtpotMilliseconds(int value)
       Output only. The Normalized Time Per Output Token (NTPOT) in milliseconds.
       This is the request latency normalized by the number of output tokens,
       measured as request_latency / total_output_tokens.
       
      int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The ntpotMilliseconds to set.
      Returns:
      This builder for chaining.
    • clearNtpotMilliseconds

      public PerformanceStats.Builder clearNtpotMilliseconds()
       Output only. The Normalized Time Per Output Token (NTPOT) in milliseconds.
       This is the request latency normalized by the number of output tokens,
       measured as request_latency / total_output_tokens.
       
      int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getTtftMilliseconds

      public int getTtftMilliseconds()
       Output only. The Time To First Token (TTFT) in milliseconds. This is the
       time it takes to generate the first token for a request.
       
      int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTtftMilliseconds in interface PerformanceStatsOrBuilder
      Returns:
      The ttftMilliseconds.
    • setTtftMilliseconds

      public PerformanceStats.Builder setTtftMilliseconds(int value)
       Output only. The Time To First Token (TTFT) in milliseconds. This is the
       time it takes to generate the first token for a request.
       
      int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The ttftMilliseconds to set.
      Returns:
      This builder for chaining.
    • clearTtftMilliseconds

      public PerformanceStats.Builder clearTtftMilliseconds()
       Output only. The Time To First Token (TTFT) in milliseconds. This is the
       time it takes to generate the first token for a request.
       
      int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getCostList

      public List<Cost> getCostList()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCostList in interface PerformanceStatsOrBuilder
    • getCostCount

      public int getCostCount()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCostCount in interface PerformanceStatsOrBuilder
    • getCost

      public Cost getCost(int index)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCost in interface PerformanceStatsOrBuilder
    • setCost

      public PerformanceStats.Builder setCost(int index, Cost value)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCost

      public PerformanceStats.Builder setCost(int index, Cost.Builder builderForValue)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCost

      public PerformanceStats.Builder addCost(Cost value)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCost

      public PerformanceStats.Builder addCost(int index, Cost value)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCost

      public PerformanceStats.Builder addCost(Cost.Builder builderForValue)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCost

      public PerformanceStats.Builder addCost(int index, Cost.Builder builderForValue)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllCost

      public PerformanceStats.Builder addAllCost(Iterable<? extends Cost> values)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCost

      public PerformanceStats.Builder clearCost()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeCost

      public PerformanceStats.Builder removeCost(int index)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCostBuilder

      public Cost.Builder getCostBuilder(int index)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCostOrBuilder

      public CostOrBuilder getCostOrBuilder(int index)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCostOrBuilder in interface PerformanceStatsOrBuilder
    • getCostOrBuilderList

      public List<? extends CostOrBuilder> getCostOrBuilderList()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCostOrBuilderList in interface PerformanceStatsOrBuilder
    • addCostBuilder

      public Cost.Builder addCostBuilder()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addCostBuilder

      public Cost.Builder addCostBuilder(int index)
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCostBuilderList

      public List<Cost.Builder> getCostBuilderList()
       Output only. The cost of running the model deployment.
       
      repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];