• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/control.proto
4
5namespace Grpc\Testing;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * Results of a single benchmark scenario.
13 *
14 * Generated from protobuf message <code>grpc.testing.ScenarioResult</code>
15 */
16class ScenarioResult extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Inputs used to run the scenario.
20     *
21     * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
22     */
23    protected $scenario = null;
24    /**
25     * Histograms from all clients merged into one histogram.
26     *
27     * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
28     */
29    protected $latencies = null;
30    /**
31     * Client stats for each client
32     *
33     * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
34     */
35    private $client_stats;
36    /**
37     * Server stats for each server
38     *
39     * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
40     */
41    private $server_stats;
42    /**
43     * Number of cores available to each server
44     *
45     * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
46     */
47    private $server_cores;
48    /**
49     * An after-the-fact computed summary
50     *
51     * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
52     */
53    protected $summary = null;
54    /**
55     * Information on success or failure of each worker
56     *
57     * Generated from protobuf field <code>repeated bool client_success = 7;</code>
58     */
59    private $client_success;
60    /**
61     * Generated from protobuf field <code>repeated bool server_success = 8;</code>
62     */
63    private $server_success;
64    /**
65     * Number of failed requests (one row per status code seen)
66     *
67     * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
68     */
69    private $request_results;
70
71    /**
72     * Constructor.
73     *
74     * @param array $data {
75     *     Optional. Data for populating the Message object.
76     *
77     *     @type \Grpc\Testing\Scenario $scenario
78     *           Inputs used to run the scenario.
79     *     @type \Grpc\Testing\HistogramData $latencies
80     *           Histograms from all clients merged into one histogram.
81     *     @type \Grpc\Testing\ClientStats[]|\Google\Protobuf\Internal\RepeatedField $client_stats
82     *           Client stats for each client
83     *     @type \Grpc\Testing\ServerStats[]|\Google\Protobuf\Internal\RepeatedField $server_stats
84     *           Server stats for each server
85     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $server_cores
86     *           Number of cores available to each server
87     *     @type \Grpc\Testing\ScenarioResultSummary $summary
88     *           An after-the-fact computed summary
89     *     @type bool[]|\Google\Protobuf\Internal\RepeatedField $client_success
90     *           Information on success or failure of each worker
91     *     @type bool[]|\Google\Protobuf\Internal\RepeatedField $server_success
92     *     @type \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $request_results
93     *           Number of failed requests (one row per status code seen)
94     * }
95     */
96    public function __construct($data = NULL) {
97        \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
98        parent::__construct($data);
99    }
100
101    /**
102     * Inputs used to run the scenario.
103     *
104     * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
105     * @return \Grpc\Testing\Scenario
106     */
107    public function getScenario()
108    {
109        return $this->scenario;
110    }
111
112    /**
113     * Inputs used to run the scenario.
114     *
115     * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
116     * @param \Grpc\Testing\Scenario $var
117     * @return $this
118     */
119    public function setScenario($var)
120    {
121        GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class);
122        $this->scenario = $var;
123
124        return $this;
125    }
126
127    /**
128     * Histograms from all clients merged into one histogram.
129     *
130     * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
131     * @return \Grpc\Testing\HistogramData
132     */
133    public function getLatencies()
134    {
135        return $this->latencies;
136    }
137
138    /**
139     * Histograms from all clients merged into one histogram.
140     *
141     * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
142     * @param \Grpc\Testing\HistogramData $var
143     * @return $this
144     */
145    public function setLatencies($var)
146    {
147        GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
148        $this->latencies = $var;
149
150        return $this;
151    }
152
153    /**
154     * Client stats for each client
155     *
156     * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
157     * @return \Google\Protobuf\Internal\RepeatedField
158     */
159    public function getClientStats()
160    {
161        return $this->client_stats;
162    }
163
164    /**
165     * Client stats for each client
166     *
167     * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
168     * @param \Grpc\Testing\ClientStats[]|\Google\Protobuf\Internal\RepeatedField $var
169     * @return $this
170     */
171    public function setClientStats($var)
172    {
173        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class);
174        $this->client_stats = $arr;
175
176        return $this;
177    }
178
179    /**
180     * Server stats for each server
181     *
182     * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
183     * @return \Google\Protobuf\Internal\RepeatedField
184     */
185    public function getServerStats()
186    {
187        return $this->server_stats;
188    }
189
190    /**
191     * Server stats for each server
192     *
193     * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
194     * @param \Grpc\Testing\ServerStats[]|\Google\Protobuf\Internal\RepeatedField $var
195     * @return $this
196     */
197    public function setServerStats($var)
198    {
199        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class);
200        $this->server_stats = $arr;
201
202        return $this;
203    }
204
205    /**
206     * Number of cores available to each server
207     *
208     * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
209     * @return \Google\Protobuf\Internal\RepeatedField
210     */
211    public function getServerCores()
212    {
213        return $this->server_cores;
214    }
215
216    /**
217     * Number of cores available to each server
218     *
219     * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
220     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
221     * @return $this
222     */
223    public function setServerCores($var)
224    {
225        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
226        $this->server_cores = $arr;
227
228        return $this;
229    }
230
231    /**
232     * An after-the-fact computed summary
233     *
234     * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
235     * @return \Grpc\Testing\ScenarioResultSummary
236     */
237    public function getSummary()
238    {
239        return $this->summary;
240    }
241
242    /**
243     * An after-the-fact computed summary
244     *
245     * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
246     * @param \Grpc\Testing\ScenarioResultSummary $var
247     * @return $this
248     */
249    public function setSummary($var)
250    {
251        GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class);
252        $this->summary = $var;
253
254        return $this;
255    }
256
257    /**
258     * Information on success or failure of each worker
259     *
260     * Generated from protobuf field <code>repeated bool client_success = 7;</code>
261     * @return \Google\Protobuf\Internal\RepeatedField
262     */
263    public function getClientSuccess()
264    {
265        return $this->client_success;
266    }
267
268    /**
269     * Information on success or failure of each worker
270     *
271     * Generated from protobuf field <code>repeated bool client_success = 7;</code>
272     * @param bool[]|\Google\Protobuf\Internal\RepeatedField $var
273     * @return $this
274     */
275    public function setClientSuccess($var)
276    {
277        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
278        $this->client_success = $arr;
279
280        return $this;
281    }
282
283    /**
284     * Generated from protobuf field <code>repeated bool server_success = 8;</code>
285     * @return \Google\Protobuf\Internal\RepeatedField
286     */
287    public function getServerSuccess()
288    {
289        return $this->server_success;
290    }
291
292    /**
293     * Generated from protobuf field <code>repeated bool server_success = 8;</code>
294     * @param bool[]|\Google\Protobuf\Internal\RepeatedField $var
295     * @return $this
296     */
297    public function setServerSuccess($var)
298    {
299        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
300        $this->server_success = $arr;
301
302        return $this;
303    }
304
305    /**
306     * Number of failed requests (one row per status code seen)
307     *
308     * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
309     * @return \Google\Protobuf\Internal\RepeatedField
310     */
311    public function getRequestResults()
312    {
313        return $this->request_results;
314    }
315
316    /**
317     * Number of failed requests (one row per status code seen)
318     *
319     * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
320     * @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var
321     * @return $this
322     */
323    public function setRequestResults($var)
324    {
325        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
326        $this->request_results = $arr;
327
328        return $this;
329    }
330
331}
332
333