<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkerecommender/v1/gkerecommender.proto

namespace Google\Cloud\GkeRecommender\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Performance statistics for a model deployment.
 *
 * Generated from protobuf message <code>google.cloud.gkerecommender.v1.PerformanceStats</code>
 */
class PerformanceStats extends \Google\Protobuf\Internal\Message
{
    /**
     * 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.
     *
     * Generated from protobuf field <code>float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $queries_per_second = 0.0;
    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $output_tokens_per_second = 0;
    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $ntpot_milliseconds = 0;
    /**
     * Output only. The Time To First Token (TTFT) in milliseconds. This is the
     * time it takes to generate the first token for a request.
     *
     * Generated from protobuf field <code>int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $ttft_milliseconds = 0;
    /**
     * Output only. The cost of running the model deployment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $cost;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $queries_per_second
     *           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.
     *     @type int $output_tokens_per_second
     *           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.
     *     @type int $ntpot_milliseconds
     *           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.
     *     @type int $ttft_milliseconds
     *           Output only. The Time To First Token (TTFT) in milliseconds. This is the
     *           time it takes to generate the first token for a request.
     *     @type \Google\Cloud\GkeRecommender\V1\Cost[] $cost
     *           Output only. The cost of running the model deployment.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkerecommender\V1\Gkerecommender::initOnce();
        parent::__construct($data);
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getQueriesPerSecond()
    {
        return $this->queries_per_second;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>float queries_per_second = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setQueriesPerSecond($var)
    {
        GPBUtil::checkFloat($var);
        $this->queries_per_second = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getOutputTokensPerSecond()
    {
        return $this->output_tokens_per_second;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 output_tokens_per_second = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setOutputTokensPerSecond($var)
    {
        GPBUtil::checkInt32($var);
        $this->output_tokens_per_second = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getNtpotMilliseconds()
    {
        return $this->ntpot_milliseconds;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>int32 ntpot_milliseconds = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setNtpotMilliseconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->ntpot_milliseconds = $var;

        return $this;
    }

    /**
     * Output only. The Time To First Token (TTFT) in milliseconds. This is the
     * time it takes to generate the first token for a request.
     *
     * Generated from protobuf field <code>int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getTtftMilliseconds()
    {
        return $this->ttft_milliseconds;
    }

    /**
     * Output only. The Time To First Token (TTFT) in milliseconds. This is the
     * time it takes to generate the first token for a request.
     *
     * Generated from protobuf field <code>int32 ttft_milliseconds = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setTtftMilliseconds($var)
    {
        GPBUtil::checkInt32($var);
        $this->ttft_milliseconds = $var;

        return $this;
    }

    /**
     * Output only. The cost of running the model deployment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\GkeRecommender\V1\Cost>
     */
    public function getCost()
    {
        return $this->cost;
    }

    /**
     * Output only. The cost of running the model deployment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkerecommender.v1.Cost cost = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\GkeRecommender\V1\Cost[] $var
     * @return $this
     */
    public function setCost($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeRecommender\V1\Cost::class);
        $this->cost = $arr;

        return $this;
    }

}

