2
0

grpc_testing_control.pb.swift 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. //
  4. // Generated by the Swift generator plugin for the protocol buffer compiler.
  5. // Source: grpc/testing/control.proto
  6. //
  7. // For information on using the generated types, please see the documentation:
  8. // https://github.com/apple/swift-protobuf/
  9. // Copyright 2015 gRPC authors.
  10. //
  11. // Licensed under the Apache License, Version 2.0 (the "License");
  12. // you may not use this file except in compliance with the License.
  13. // You may obtain a copy of the License at
  14. //
  15. // http://www.apache.org/licenses/LICENSE-2.0
  16. //
  17. // Unless required by applicable law or agreed to in writing, software
  18. // distributed under the License is distributed on an "AS IS" BASIS,
  19. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20. // See the License for the specific language governing permissions and
  21. // limitations under the License.
  22. import Foundation
  23. import SwiftProtobuf
  24. // If the compiler emits an error on this type, it is because this file
  25. // was generated by a version of the `protoc` Swift plug-in that is
  26. // incompatible with the version of SwiftProtobuf to which you are linking.
  27. // Please ensure that you are building against the same version of the API
  28. // that was used to generate this file.
  29. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  30. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  31. typealias Version = _2
  32. }
  33. enum Grpc_Testing_ClientType: SwiftProtobuf.Enum {
  34. typealias RawValue = Int
  35. /// Many languages support a basic distinction between using
  36. /// sync or async client, and this allows the specification
  37. case syncClient // = 0
  38. case asyncClient // = 1
  39. /// used for some language-specific variants
  40. case otherClient // = 2
  41. case callbackClient // = 3
  42. case UNRECOGNIZED(Int)
  43. init() {
  44. self = .syncClient
  45. }
  46. init?(rawValue: Int) {
  47. switch rawValue {
  48. case 0: self = .syncClient
  49. case 1: self = .asyncClient
  50. case 2: self = .otherClient
  51. case 3: self = .callbackClient
  52. default: self = .UNRECOGNIZED(rawValue)
  53. }
  54. }
  55. var rawValue: Int {
  56. switch self {
  57. case .syncClient: return 0
  58. case .asyncClient: return 1
  59. case .otherClient: return 2
  60. case .callbackClient: return 3
  61. case .UNRECOGNIZED(let i): return i
  62. }
  63. }
  64. }
  65. #if swift(>=4.2)
  66. extension Grpc_Testing_ClientType: CaseIterable {
  67. // The compiler won't synthesize support with the UNRECOGNIZED case.
  68. static let allCases: [Grpc_Testing_ClientType] = [
  69. .syncClient,
  70. .asyncClient,
  71. .otherClient,
  72. .callbackClient,
  73. ]
  74. }
  75. #endif // swift(>=4.2)
  76. enum Grpc_Testing_ServerType: SwiftProtobuf.Enum {
  77. typealias RawValue = Int
  78. case syncServer // = 0
  79. case asyncServer // = 1
  80. case asyncGenericServer // = 2
  81. /// used for some language-specific variants
  82. case otherServer // = 3
  83. case callbackServer // = 4
  84. case UNRECOGNIZED(Int)
  85. init() {
  86. self = .syncServer
  87. }
  88. init?(rawValue: Int) {
  89. switch rawValue {
  90. case 0: self = .syncServer
  91. case 1: self = .asyncServer
  92. case 2: self = .asyncGenericServer
  93. case 3: self = .otherServer
  94. case 4: self = .callbackServer
  95. default: self = .UNRECOGNIZED(rawValue)
  96. }
  97. }
  98. var rawValue: Int {
  99. switch self {
  100. case .syncServer: return 0
  101. case .asyncServer: return 1
  102. case .asyncGenericServer: return 2
  103. case .otherServer: return 3
  104. case .callbackServer: return 4
  105. case .UNRECOGNIZED(let i): return i
  106. }
  107. }
  108. }
  109. #if swift(>=4.2)
  110. extension Grpc_Testing_ServerType: CaseIterable {
  111. // The compiler won't synthesize support with the UNRECOGNIZED case.
  112. static let allCases: [Grpc_Testing_ServerType] = [
  113. .syncServer,
  114. .asyncServer,
  115. .asyncGenericServer,
  116. .otherServer,
  117. .callbackServer,
  118. ]
  119. }
  120. #endif // swift(>=4.2)
  121. enum Grpc_Testing_RpcType: SwiftProtobuf.Enum {
  122. typealias RawValue = Int
  123. case unary // = 0
  124. case streaming // = 1
  125. case streamingFromClient // = 2
  126. case streamingFromServer // = 3
  127. case streamingBothWays // = 4
  128. case UNRECOGNIZED(Int)
  129. init() {
  130. self = .unary
  131. }
  132. init?(rawValue: Int) {
  133. switch rawValue {
  134. case 0: self = .unary
  135. case 1: self = .streaming
  136. case 2: self = .streamingFromClient
  137. case 3: self = .streamingFromServer
  138. case 4: self = .streamingBothWays
  139. default: self = .UNRECOGNIZED(rawValue)
  140. }
  141. }
  142. var rawValue: Int {
  143. switch self {
  144. case .unary: return 0
  145. case .streaming: return 1
  146. case .streamingFromClient: return 2
  147. case .streamingFromServer: return 3
  148. case .streamingBothWays: return 4
  149. case .UNRECOGNIZED(let i): return i
  150. }
  151. }
  152. }
  153. #if swift(>=4.2)
  154. extension Grpc_Testing_RpcType: CaseIterable {
  155. // The compiler won't synthesize support with the UNRECOGNIZED case.
  156. static let allCases: [Grpc_Testing_RpcType] = [
  157. .unary,
  158. .streaming,
  159. .streamingFromClient,
  160. .streamingFromServer,
  161. .streamingBothWays,
  162. ]
  163. }
  164. #endif // swift(>=4.2)
  165. /// Parameters of poisson process distribution, which is a good representation
  166. /// of activity coming in from independent identical stationary sources.
  167. struct Grpc_Testing_PoissonParams {
  168. // SwiftProtobuf.Message conformance is added in an extension below. See the
  169. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  170. // methods supported on all messages.
  171. /// The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
  172. var offeredLoad: Double = 0
  173. var unknownFields = SwiftProtobuf.UnknownStorage()
  174. init() {}
  175. }
  176. /// Once an RPC finishes, immediately start a new one.
  177. /// No configuration parameters needed.
  178. struct Grpc_Testing_ClosedLoopParams {
  179. // SwiftProtobuf.Message conformance is added in an extension below. See the
  180. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  181. // methods supported on all messages.
  182. var unknownFields = SwiftProtobuf.UnknownStorage()
  183. init() {}
  184. }
  185. struct Grpc_Testing_LoadParams {
  186. // SwiftProtobuf.Message conformance is added in an extension below. See the
  187. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  188. // methods supported on all messages.
  189. var load: Grpc_Testing_LoadParams.OneOf_Load? = nil
  190. var closedLoop: Grpc_Testing_ClosedLoopParams {
  191. get {
  192. if case .closedLoop(let v)? = load {return v}
  193. return Grpc_Testing_ClosedLoopParams()
  194. }
  195. set {load = .closedLoop(newValue)}
  196. }
  197. var poisson: Grpc_Testing_PoissonParams {
  198. get {
  199. if case .poisson(let v)? = load {return v}
  200. return Grpc_Testing_PoissonParams()
  201. }
  202. set {load = .poisson(newValue)}
  203. }
  204. var unknownFields = SwiftProtobuf.UnknownStorage()
  205. enum OneOf_Load: Equatable {
  206. case closedLoop(Grpc_Testing_ClosedLoopParams)
  207. case poisson(Grpc_Testing_PoissonParams)
  208. #if !swift(>=4.1)
  209. static func ==(lhs: Grpc_Testing_LoadParams.OneOf_Load, rhs: Grpc_Testing_LoadParams.OneOf_Load) -> Bool {
  210. // The use of inline closures is to circumvent an issue where the compiler
  211. // allocates stack space for every case branch when no optimizations are
  212. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  213. switch (lhs, rhs) {
  214. case (.closedLoop, .closedLoop): return {
  215. guard case .closedLoop(let l) = lhs, case .closedLoop(let r) = rhs else { preconditionFailure() }
  216. return l == r
  217. }()
  218. case (.poisson, .poisson): return {
  219. guard case .poisson(let l) = lhs, case .poisson(let r) = rhs else { preconditionFailure() }
  220. return l == r
  221. }()
  222. default: return false
  223. }
  224. }
  225. #endif
  226. }
  227. init() {}
  228. }
  229. /// presence of SecurityParams implies use of TLS
  230. struct Grpc_Testing_SecurityParams {
  231. // SwiftProtobuf.Message conformance is added in an extension below. See the
  232. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  233. // methods supported on all messages.
  234. var useTestCa: Bool = false
  235. var serverHostOverride: String = String()
  236. var credType: String = String()
  237. var unknownFields = SwiftProtobuf.UnknownStorage()
  238. init() {}
  239. }
  240. struct Grpc_Testing_ChannelArg {
  241. // SwiftProtobuf.Message conformance is added in an extension below. See the
  242. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  243. // methods supported on all messages.
  244. var name: String = String()
  245. var value: Grpc_Testing_ChannelArg.OneOf_Value? = nil
  246. var strValue: String {
  247. get {
  248. if case .strValue(let v)? = value {return v}
  249. return String()
  250. }
  251. set {value = .strValue(newValue)}
  252. }
  253. var intValue: Int32 {
  254. get {
  255. if case .intValue(let v)? = value {return v}
  256. return 0
  257. }
  258. set {value = .intValue(newValue)}
  259. }
  260. var unknownFields = SwiftProtobuf.UnknownStorage()
  261. enum OneOf_Value: Equatable {
  262. case strValue(String)
  263. case intValue(Int32)
  264. #if !swift(>=4.1)
  265. static func ==(lhs: Grpc_Testing_ChannelArg.OneOf_Value, rhs: Grpc_Testing_ChannelArg.OneOf_Value) -> Bool {
  266. // The use of inline closures is to circumvent an issue where the compiler
  267. // allocates stack space for every case branch when no optimizations are
  268. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  269. switch (lhs, rhs) {
  270. case (.strValue, .strValue): return {
  271. guard case .strValue(let l) = lhs, case .strValue(let r) = rhs else { preconditionFailure() }
  272. return l == r
  273. }()
  274. case (.intValue, .intValue): return {
  275. guard case .intValue(let l) = lhs, case .intValue(let r) = rhs else { preconditionFailure() }
  276. return l == r
  277. }()
  278. default: return false
  279. }
  280. }
  281. #endif
  282. }
  283. init() {}
  284. }
  285. struct Grpc_Testing_ClientConfig {
  286. // SwiftProtobuf.Message conformance is added in an extension below. See the
  287. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  288. // methods supported on all messages.
  289. /// List of targets to connect to. At least one target needs to be specified.
  290. var serverTargets: [String] {
  291. get {return _storage._serverTargets}
  292. set {_uniqueStorage()._serverTargets = newValue}
  293. }
  294. var clientType: Grpc_Testing_ClientType {
  295. get {return _storage._clientType}
  296. set {_uniqueStorage()._clientType = newValue}
  297. }
  298. var securityParams: Grpc_Testing_SecurityParams {
  299. get {return _storage._securityParams ?? Grpc_Testing_SecurityParams()}
  300. set {_uniqueStorage()._securityParams = newValue}
  301. }
  302. /// Returns true if `securityParams` has been explicitly set.
  303. var hasSecurityParams: Bool {return _storage._securityParams != nil}
  304. /// Clears the value of `securityParams`. Subsequent reads from it will return its default value.
  305. mutating func clearSecurityParams() {_uniqueStorage()._securityParams = nil}
  306. /// How many concurrent RPCs to start for each channel.
  307. /// For synchronous client, use a separate thread for each outstanding RPC.
  308. var outstandingRpcsPerChannel: Int32 {
  309. get {return _storage._outstandingRpcsPerChannel}
  310. set {_uniqueStorage()._outstandingRpcsPerChannel = newValue}
  311. }
  312. /// Number of independent client channels to create.
  313. /// i-th channel will connect to server_target[i % server_targets.size()]
  314. var clientChannels: Int32 {
  315. get {return _storage._clientChannels}
  316. set {_uniqueStorage()._clientChannels = newValue}
  317. }
  318. /// Only for async client. Number of threads to use to start/manage RPCs.
  319. var asyncClientThreads: Int32 {
  320. get {return _storage._asyncClientThreads}
  321. set {_uniqueStorage()._asyncClientThreads = newValue}
  322. }
  323. var rpcType: Grpc_Testing_RpcType {
  324. get {return _storage._rpcType}
  325. set {_uniqueStorage()._rpcType = newValue}
  326. }
  327. /// The requested load for the entire client (aggregated over all the threads).
  328. var loadParams: Grpc_Testing_LoadParams {
  329. get {return _storage._loadParams ?? Grpc_Testing_LoadParams()}
  330. set {_uniqueStorage()._loadParams = newValue}
  331. }
  332. /// Returns true if `loadParams` has been explicitly set.
  333. var hasLoadParams: Bool {return _storage._loadParams != nil}
  334. /// Clears the value of `loadParams`. Subsequent reads from it will return its default value.
  335. mutating func clearLoadParams() {_uniqueStorage()._loadParams = nil}
  336. var payloadConfig: Grpc_Testing_PayloadConfig {
  337. get {return _storage._payloadConfig ?? Grpc_Testing_PayloadConfig()}
  338. set {_uniqueStorage()._payloadConfig = newValue}
  339. }
  340. /// Returns true if `payloadConfig` has been explicitly set.
  341. var hasPayloadConfig: Bool {return _storage._payloadConfig != nil}
  342. /// Clears the value of `payloadConfig`. Subsequent reads from it will return its default value.
  343. mutating func clearPayloadConfig() {_uniqueStorage()._payloadConfig = nil}
  344. var histogramParams: Grpc_Testing_HistogramParams {
  345. get {return _storage._histogramParams ?? Grpc_Testing_HistogramParams()}
  346. set {_uniqueStorage()._histogramParams = newValue}
  347. }
  348. /// Returns true if `histogramParams` has been explicitly set.
  349. var hasHistogramParams: Bool {return _storage._histogramParams != nil}
  350. /// Clears the value of `histogramParams`. Subsequent reads from it will return its default value.
  351. mutating func clearHistogramParams() {_uniqueStorage()._histogramParams = nil}
  352. /// Specify the cores we should run the client on, if desired
  353. var coreList: [Int32] {
  354. get {return _storage._coreList}
  355. set {_uniqueStorage()._coreList = newValue}
  356. }
  357. var coreLimit: Int32 {
  358. get {return _storage._coreLimit}
  359. set {_uniqueStorage()._coreLimit = newValue}
  360. }
  361. /// If we use an OTHER_CLIENT client_type, this string gives more detail
  362. var otherClientApi: String {
  363. get {return _storage._otherClientApi}
  364. set {_uniqueStorage()._otherClientApi = newValue}
  365. }
  366. var channelArgs: [Grpc_Testing_ChannelArg] {
  367. get {return _storage._channelArgs}
  368. set {_uniqueStorage()._channelArgs = newValue}
  369. }
  370. /// Number of threads that share each completion queue
  371. var threadsPerCq: Int32 {
  372. get {return _storage._threadsPerCq}
  373. set {_uniqueStorage()._threadsPerCq = newValue}
  374. }
  375. /// Number of messages on a stream before it gets finished/restarted
  376. var messagesPerStream: Int32 {
  377. get {return _storage._messagesPerStream}
  378. set {_uniqueStorage()._messagesPerStream = newValue}
  379. }
  380. /// Use coalescing API when possible.
  381. var useCoalesceApi: Bool {
  382. get {return _storage._useCoalesceApi}
  383. set {_uniqueStorage()._useCoalesceApi = newValue}
  384. }
  385. /// If 0, disabled. Else, specifies the period between gathering latency
  386. /// medians in milliseconds.
  387. var medianLatencyCollectionIntervalMillis: Int32 {
  388. get {return _storage._medianLatencyCollectionIntervalMillis}
  389. set {_uniqueStorage()._medianLatencyCollectionIntervalMillis = newValue}
  390. }
  391. /// Number of client processes. 0 indicates no restriction.
  392. var clientProcesses: Int32 {
  393. get {return _storage._clientProcesses}
  394. set {_uniqueStorage()._clientProcesses = newValue}
  395. }
  396. var unknownFields = SwiftProtobuf.UnknownStorage()
  397. init() {}
  398. fileprivate var _storage = _StorageClass.defaultInstance
  399. }
  400. struct Grpc_Testing_ClientStatus {
  401. // SwiftProtobuf.Message conformance is added in an extension below. See the
  402. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  403. // methods supported on all messages.
  404. var stats: Grpc_Testing_ClientStats {
  405. get {return _stats ?? Grpc_Testing_ClientStats()}
  406. set {_stats = newValue}
  407. }
  408. /// Returns true if `stats` has been explicitly set.
  409. var hasStats: Bool {return self._stats != nil}
  410. /// Clears the value of `stats`. Subsequent reads from it will return its default value.
  411. mutating func clearStats() {self._stats = nil}
  412. var unknownFields = SwiftProtobuf.UnknownStorage()
  413. init() {}
  414. fileprivate var _stats: Grpc_Testing_ClientStats? = nil
  415. }
  416. /// Request current stats
  417. struct Grpc_Testing_Mark {
  418. // SwiftProtobuf.Message conformance is added in an extension below. See the
  419. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  420. // methods supported on all messages.
  421. /// if true, the stats will be reset after taking their snapshot.
  422. var reset: Bool = false
  423. var unknownFields = SwiftProtobuf.UnknownStorage()
  424. init() {}
  425. }
  426. struct Grpc_Testing_ClientArgs {
  427. // SwiftProtobuf.Message conformance is added in an extension below. See the
  428. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  429. // methods supported on all messages.
  430. var argtype: Grpc_Testing_ClientArgs.OneOf_Argtype? = nil
  431. var setup: Grpc_Testing_ClientConfig {
  432. get {
  433. if case .setup(let v)? = argtype {return v}
  434. return Grpc_Testing_ClientConfig()
  435. }
  436. set {argtype = .setup(newValue)}
  437. }
  438. var mark: Grpc_Testing_Mark {
  439. get {
  440. if case .mark(let v)? = argtype {return v}
  441. return Grpc_Testing_Mark()
  442. }
  443. set {argtype = .mark(newValue)}
  444. }
  445. var unknownFields = SwiftProtobuf.UnknownStorage()
  446. enum OneOf_Argtype: Equatable {
  447. case setup(Grpc_Testing_ClientConfig)
  448. case mark(Grpc_Testing_Mark)
  449. #if !swift(>=4.1)
  450. static func ==(lhs: Grpc_Testing_ClientArgs.OneOf_Argtype, rhs: Grpc_Testing_ClientArgs.OneOf_Argtype) -> Bool {
  451. // The use of inline closures is to circumvent an issue where the compiler
  452. // allocates stack space for every case branch when no optimizations are
  453. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  454. switch (lhs, rhs) {
  455. case (.setup, .setup): return {
  456. guard case .setup(let l) = lhs, case .setup(let r) = rhs else { preconditionFailure() }
  457. return l == r
  458. }()
  459. case (.mark, .mark): return {
  460. guard case .mark(let l) = lhs, case .mark(let r) = rhs else { preconditionFailure() }
  461. return l == r
  462. }()
  463. default: return false
  464. }
  465. }
  466. #endif
  467. }
  468. init() {}
  469. }
  470. struct Grpc_Testing_ServerConfig {
  471. // SwiftProtobuf.Message conformance is added in an extension below. See the
  472. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  473. // methods supported on all messages.
  474. var serverType: Grpc_Testing_ServerType = .syncServer
  475. var securityParams: Grpc_Testing_SecurityParams {
  476. get {return _securityParams ?? Grpc_Testing_SecurityParams()}
  477. set {_securityParams = newValue}
  478. }
  479. /// Returns true if `securityParams` has been explicitly set.
  480. var hasSecurityParams: Bool {return self._securityParams != nil}
  481. /// Clears the value of `securityParams`. Subsequent reads from it will return its default value.
  482. mutating func clearSecurityParams() {self._securityParams = nil}
  483. /// Port on which to listen. Zero means pick unused port.
  484. var port: Int32 = 0
  485. /// Only for async server. Number of threads used to serve the requests.
  486. var asyncServerThreads: Int32 = 0
  487. /// Specify the number of cores to limit server to, if desired
  488. var coreLimit: Int32 = 0
  489. /// payload config, used in generic server.
  490. /// Note this must NOT be used in proto (non-generic) servers. For proto servers,
  491. /// 'response sizes' must be configured from the 'response_size' field of the
  492. /// 'SimpleRequest' objects in RPC requests.
  493. var payloadConfig: Grpc_Testing_PayloadConfig {
  494. get {return _payloadConfig ?? Grpc_Testing_PayloadConfig()}
  495. set {_payloadConfig = newValue}
  496. }
  497. /// Returns true if `payloadConfig` has been explicitly set.
  498. var hasPayloadConfig: Bool {return self._payloadConfig != nil}
  499. /// Clears the value of `payloadConfig`. Subsequent reads from it will return its default value.
  500. mutating func clearPayloadConfig() {self._payloadConfig = nil}
  501. /// Specify the cores we should run the server on, if desired
  502. var coreList: [Int32] = []
  503. /// If we use an OTHER_SERVER client_type, this string gives more detail
  504. var otherServerApi: String = String()
  505. /// Number of threads that share each completion queue
  506. var threadsPerCq: Int32 = 0
  507. /// Buffer pool size (no buffer pool specified if unset)
  508. var resourceQuotaSize: Int32 = 0
  509. var channelArgs: [Grpc_Testing_ChannelArg] = []
  510. /// Number of server processes. 0 indicates no restriction.
  511. var serverProcesses: Int32 = 0
  512. var unknownFields = SwiftProtobuf.UnknownStorage()
  513. init() {}
  514. fileprivate var _securityParams: Grpc_Testing_SecurityParams? = nil
  515. fileprivate var _payloadConfig: Grpc_Testing_PayloadConfig? = nil
  516. }
  517. struct Grpc_Testing_ServerArgs {
  518. // SwiftProtobuf.Message conformance is added in an extension below. See the
  519. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  520. // methods supported on all messages.
  521. var argtype: Grpc_Testing_ServerArgs.OneOf_Argtype? = nil
  522. var setup: Grpc_Testing_ServerConfig {
  523. get {
  524. if case .setup(let v)? = argtype {return v}
  525. return Grpc_Testing_ServerConfig()
  526. }
  527. set {argtype = .setup(newValue)}
  528. }
  529. var mark: Grpc_Testing_Mark {
  530. get {
  531. if case .mark(let v)? = argtype {return v}
  532. return Grpc_Testing_Mark()
  533. }
  534. set {argtype = .mark(newValue)}
  535. }
  536. var unknownFields = SwiftProtobuf.UnknownStorage()
  537. enum OneOf_Argtype: Equatable {
  538. case setup(Grpc_Testing_ServerConfig)
  539. case mark(Grpc_Testing_Mark)
  540. #if !swift(>=4.1)
  541. static func ==(lhs: Grpc_Testing_ServerArgs.OneOf_Argtype, rhs: Grpc_Testing_ServerArgs.OneOf_Argtype) -> Bool {
  542. // The use of inline closures is to circumvent an issue where the compiler
  543. // allocates stack space for every case branch when no optimizations are
  544. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  545. switch (lhs, rhs) {
  546. case (.setup, .setup): return {
  547. guard case .setup(let l) = lhs, case .setup(let r) = rhs else { preconditionFailure() }
  548. return l == r
  549. }()
  550. case (.mark, .mark): return {
  551. guard case .mark(let l) = lhs, case .mark(let r) = rhs else { preconditionFailure() }
  552. return l == r
  553. }()
  554. default: return false
  555. }
  556. }
  557. #endif
  558. }
  559. init() {}
  560. }
  561. struct Grpc_Testing_ServerStatus {
  562. // SwiftProtobuf.Message conformance is added in an extension below. See the
  563. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  564. // methods supported on all messages.
  565. var stats: Grpc_Testing_ServerStats {
  566. get {return _stats ?? Grpc_Testing_ServerStats()}
  567. set {_stats = newValue}
  568. }
  569. /// Returns true if `stats` has been explicitly set.
  570. var hasStats: Bool {return self._stats != nil}
  571. /// Clears the value of `stats`. Subsequent reads from it will return its default value.
  572. mutating func clearStats() {self._stats = nil}
  573. /// the port bound by the server
  574. var port: Int32 = 0
  575. /// Number of cores available to the server
  576. var cores: Int32 = 0
  577. var unknownFields = SwiftProtobuf.UnknownStorage()
  578. init() {}
  579. fileprivate var _stats: Grpc_Testing_ServerStats? = nil
  580. }
  581. struct Grpc_Testing_CoreRequest {
  582. // SwiftProtobuf.Message conformance is added in an extension below. See the
  583. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  584. // methods supported on all messages.
  585. var unknownFields = SwiftProtobuf.UnknownStorage()
  586. init() {}
  587. }
  588. struct Grpc_Testing_CoreResponse {
  589. // SwiftProtobuf.Message conformance is added in an extension below. See the
  590. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  591. // methods supported on all messages.
  592. /// Number of cores available on the server
  593. var cores: Int32 = 0
  594. var unknownFields = SwiftProtobuf.UnknownStorage()
  595. init() {}
  596. }
  597. struct Grpc_Testing_Void {
  598. // SwiftProtobuf.Message conformance is added in an extension below. See the
  599. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  600. // methods supported on all messages.
  601. var unknownFields = SwiftProtobuf.UnknownStorage()
  602. init() {}
  603. }
  604. /// A single performance scenario: input to qps_json_driver
  605. struct Grpc_Testing_Scenario {
  606. // SwiftProtobuf.Message conformance is added in an extension below. See the
  607. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  608. // methods supported on all messages.
  609. /// Human readable name for this scenario
  610. var name: String {
  611. get {return _storage._name}
  612. set {_uniqueStorage()._name = newValue}
  613. }
  614. /// Client configuration
  615. var clientConfig: Grpc_Testing_ClientConfig {
  616. get {return _storage._clientConfig ?? Grpc_Testing_ClientConfig()}
  617. set {_uniqueStorage()._clientConfig = newValue}
  618. }
  619. /// Returns true if `clientConfig` has been explicitly set.
  620. var hasClientConfig: Bool {return _storage._clientConfig != nil}
  621. /// Clears the value of `clientConfig`. Subsequent reads from it will return its default value.
  622. mutating func clearClientConfig() {_uniqueStorage()._clientConfig = nil}
  623. /// Number of clients to start for the test
  624. var numClients: Int32 {
  625. get {return _storage._numClients}
  626. set {_uniqueStorage()._numClients = newValue}
  627. }
  628. /// Server configuration
  629. var serverConfig: Grpc_Testing_ServerConfig {
  630. get {return _storage._serverConfig ?? Grpc_Testing_ServerConfig()}
  631. set {_uniqueStorage()._serverConfig = newValue}
  632. }
  633. /// Returns true if `serverConfig` has been explicitly set.
  634. var hasServerConfig: Bool {return _storage._serverConfig != nil}
  635. /// Clears the value of `serverConfig`. Subsequent reads from it will return its default value.
  636. mutating func clearServerConfig() {_uniqueStorage()._serverConfig = nil}
  637. /// Number of servers to start for the test
  638. var numServers: Int32 {
  639. get {return _storage._numServers}
  640. set {_uniqueStorage()._numServers = newValue}
  641. }
  642. /// Warmup period, in seconds
  643. var warmupSeconds: Int32 {
  644. get {return _storage._warmupSeconds}
  645. set {_uniqueStorage()._warmupSeconds = newValue}
  646. }
  647. /// Benchmark time, in seconds
  648. var benchmarkSeconds: Int32 {
  649. get {return _storage._benchmarkSeconds}
  650. set {_uniqueStorage()._benchmarkSeconds = newValue}
  651. }
  652. /// Number of workers to spawn locally (usually zero)
  653. var spawnLocalWorkerCount: Int32 {
  654. get {return _storage._spawnLocalWorkerCount}
  655. set {_uniqueStorage()._spawnLocalWorkerCount = newValue}
  656. }
  657. var unknownFields = SwiftProtobuf.UnknownStorage()
  658. init() {}
  659. fileprivate var _storage = _StorageClass.defaultInstance
  660. }
  661. /// A set of scenarios to be run with qps_json_driver
  662. struct Grpc_Testing_Scenarios {
  663. // SwiftProtobuf.Message conformance is added in an extension below. See the
  664. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  665. // methods supported on all messages.
  666. var scenarios: [Grpc_Testing_Scenario] = []
  667. var unknownFields = SwiftProtobuf.UnknownStorage()
  668. init() {}
  669. }
  670. /// Basic summary that can be computed from ClientStats and ServerStats
  671. /// once the scenario has finished.
  672. struct Grpc_Testing_ScenarioResultSummary {
  673. // SwiftProtobuf.Message conformance is added in an extension below. See the
  674. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  675. // methods supported on all messages.
  676. /// Total number of operations per second over all clients. What is counted as 1 'operation' depends on the benchmark scenarios:
  677. /// For unary benchmarks, an operation is processing of a single unary RPC.
  678. /// For streaming benchmarks, an operation is processing of a single ping pong of request and response.
  679. var qps: Double {
  680. get {return _storage._qps}
  681. set {_uniqueStorage()._qps = newValue}
  682. }
  683. /// QPS per server core.
  684. var qpsPerServerCore: Double {
  685. get {return _storage._qpsPerServerCore}
  686. set {_uniqueStorage()._qpsPerServerCore = newValue}
  687. }
  688. /// The total server cpu load based on system time across all server processes, expressed as percentage of a single cpu core.
  689. /// For example, 85 implies 85% of a cpu core, 125 implies 125% of a cpu core. Since we are accumulating the cpu load across all the server
  690. /// processes, the value could > 100 when there are multiple servers or a single server using multiple threads and cores.
  691. /// Same explanation for the total client cpu load below.
  692. var serverSystemTime: Double {
  693. get {return _storage._serverSystemTime}
  694. set {_uniqueStorage()._serverSystemTime = newValue}
  695. }
  696. /// The total server cpu load based on user time across all server processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%)
  697. var serverUserTime: Double {
  698. get {return _storage._serverUserTime}
  699. set {_uniqueStorage()._serverUserTime = newValue}
  700. }
  701. /// The total client cpu load based on system time across all client processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%)
  702. var clientSystemTime: Double {
  703. get {return _storage._clientSystemTime}
  704. set {_uniqueStorage()._clientSystemTime = newValue}
  705. }
  706. /// The total client cpu load based on user time across all client processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%)
  707. var clientUserTime: Double {
  708. get {return _storage._clientUserTime}
  709. set {_uniqueStorage()._clientUserTime = newValue}
  710. }
  711. /// X% latency percentiles (in nanoseconds)
  712. var latency50: Double {
  713. get {return _storage._latency50}
  714. set {_uniqueStorage()._latency50 = newValue}
  715. }
  716. var latency90: Double {
  717. get {return _storage._latency90}
  718. set {_uniqueStorage()._latency90 = newValue}
  719. }
  720. var latency95: Double {
  721. get {return _storage._latency95}
  722. set {_uniqueStorage()._latency95 = newValue}
  723. }
  724. var latency99: Double {
  725. get {return _storage._latency99}
  726. set {_uniqueStorage()._latency99 = newValue}
  727. }
  728. var latency999: Double {
  729. get {return _storage._latency999}
  730. set {_uniqueStorage()._latency999 = newValue}
  731. }
  732. /// server cpu usage percentage
  733. var serverCpuUsage: Double {
  734. get {return _storage._serverCpuUsage}
  735. set {_uniqueStorage()._serverCpuUsage = newValue}
  736. }
  737. /// Number of requests that succeeded/failed
  738. var successfulRequestsPerSecond: Double {
  739. get {return _storage._successfulRequestsPerSecond}
  740. set {_uniqueStorage()._successfulRequestsPerSecond = newValue}
  741. }
  742. var failedRequestsPerSecond: Double {
  743. get {return _storage._failedRequestsPerSecond}
  744. set {_uniqueStorage()._failedRequestsPerSecond = newValue}
  745. }
  746. /// Number of polls called inside completion queue per request
  747. var clientPollsPerRequest: Double {
  748. get {return _storage._clientPollsPerRequest}
  749. set {_uniqueStorage()._clientPollsPerRequest = newValue}
  750. }
  751. var serverPollsPerRequest: Double {
  752. get {return _storage._serverPollsPerRequest}
  753. set {_uniqueStorage()._serverPollsPerRequest = newValue}
  754. }
  755. /// Queries per CPU-sec over all servers or clients
  756. var serverQueriesPerCpuSec: Double {
  757. get {return _storage._serverQueriesPerCpuSec}
  758. set {_uniqueStorage()._serverQueriesPerCpuSec = newValue}
  759. }
  760. var clientQueriesPerCpuSec: Double {
  761. get {return _storage._clientQueriesPerCpuSec}
  762. set {_uniqueStorage()._clientQueriesPerCpuSec = newValue}
  763. }
  764. /// Start and end time for the test scenario
  765. var startTime: SwiftProtobuf.Google_Protobuf_Timestamp {
  766. get {return _storage._startTime ?? SwiftProtobuf.Google_Protobuf_Timestamp()}
  767. set {_uniqueStorage()._startTime = newValue}
  768. }
  769. /// Returns true if `startTime` has been explicitly set.
  770. var hasStartTime: Bool {return _storage._startTime != nil}
  771. /// Clears the value of `startTime`. Subsequent reads from it will return its default value.
  772. mutating func clearStartTime() {_uniqueStorage()._startTime = nil}
  773. var endTime: SwiftProtobuf.Google_Protobuf_Timestamp {
  774. get {return _storage._endTime ?? SwiftProtobuf.Google_Protobuf_Timestamp()}
  775. set {_uniqueStorage()._endTime = newValue}
  776. }
  777. /// Returns true if `endTime` has been explicitly set.
  778. var hasEndTime: Bool {return _storage._endTime != nil}
  779. /// Clears the value of `endTime`. Subsequent reads from it will return its default value.
  780. mutating func clearEndTime() {_uniqueStorage()._endTime = nil}
  781. var unknownFields = SwiftProtobuf.UnknownStorage()
  782. init() {}
  783. fileprivate var _storage = _StorageClass.defaultInstance
  784. }
  785. /// Results of a single benchmark scenario.
  786. struct Grpc_Testing_ScenarioResult {
  787. // SwiftProtobuf.Message conformance is added in an extension below. See the
  788. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  789. // methods supported on all messages.
  790. /// Inputs used to run the scenario.
  791. var scenario: Grpc_Testing_Scenario {
  792. get {return _scenario ?? Grpc_Testing_Scenario()}
  793. set {_scenario = newValue}
  794. }
  795. /// Returns true if `scenario` has been explicitly set.
  796. var hasScenario: Bool {return self._scenario != nil}
  797. /// Clears the value of `scenario`. Subsequent reads from it will return its default value.
  798. mutating func clearScenario() {self._scenario = nil}
  799. /// Histograms from all clients merged into one histogram.
  800. var latencies: Grpc_Testing_HistogramData {
  801. get {return _latencies ?? Grpc_Testing_HistogramData()}
  802. set {_latencies = newValue}
  803. }
  804. /// Returns true if `latencies` has been explicitly set.
  805. var hasLatencies: Bool {return self._latencies != nil}
  806. /// Clears the value of `latencies`. Subsequent reads from it will return its default value.
  807. mutating func clearLatencies() {self._latencies = nil}
  808. /// Client stats for each client
  809. var clientStats: [Grpc_Testing_ClientStats] = []
  810. /// Server stats for each server
  811. var serverStats: [Grpc_Testing_ServerStats] = []
  812. /// Number of cores available to each server
  813. var serverCores: [Int32] = []
  814. /// An after-the-fact computed summary
  815. var summary: Grpc_Testing_ScenarioResultSummary {
  816. get {return _summary ?? Grpc_Testing_ScenarioResultSummary()}
  817. set {_summary = newValue}
  818. }
  819. /// Returns true if `summary` has been explicitly set.
  820. var hasSummary: Bool {return self._summary != nil}
  821. /// Clears the value of `summary`. Subsequent reads from it will return its default value.
  822. mutating func clearSummary() {self._summary = nil}
  823. /// Information on success or failure of each worker
  824. var clientSuccess: [Bool] = []
  825. var serverSuccess: [Bool] = []
  826. /// Number of failed requests (one row per status code seen)
  827. var requestResults: [Grpc_Testing_RequestResultCount] = []
  828. var unknownFields = SwiftProtobuf.UnknownStorage()
  829. init() {}
  830. fileprivate var _scenario: Grpc_Testing_Scenario? = nil
  831. fileprivate var _latencies: Grpc_Testing_HistogramData? = nil
  832. fileprivate var _summary: Grpc_Testing_ScenarioResultSummary? = nil
  833. }
  834. #if swift(>=5.5) && canImport(_Concurrency)
  835. extension Grpc_Testing_ClientType: @unchecked Sendable {}
  836. extension Grpc_Testing_ServerType: @unchecked Sendable {}
  837. extension Grpc_Testing_RpcType: @unchecked Sendable {}
  838. extension Grpc_Testing_PoissonParams: @unchecked Sendable {}
  839. extension Grpc_Testing_ClosedLoopParams: @unchecked Sendable {}
  840. extension Grpc_Testing_LoadParams: @unchecked Sendable {}
  841. extension Grpc_Testing_LoadParams.OneOf_Load: @unchecked Sendable {}
  842. extension Grpc_Testing_SecurityParams: @unchecked Sendable {}
  843. extension Grpc_Testing_ChannelArg: @unchecked Sendable {}
  844. extension Grpc_Testing_ChannelArg.OneOf_Value: @unchecked Sendable {}
  845. extension Grpc_Testing_ClientConfig: @unchecked Sendable {}
  846. extension Grpc_Testing_ClientStatus: @unchecked Sendable {}
  847. extension Grpc_Testing_Mark: @unchecked Sendable {}
  848. extension Grpc_Testing_ClientArgs: @unchecked Sendable {}
  849. extension Grpc_Testing_ClientArgs.OneOf_Argtype: @unchecked Sendable {}
  850. extension Grpc_Testing_ServerConfig: @unchecked Sendable {}
  851. extension Grpc_Testing_ServerArgs: @unchecked Sendable {}
  852. extension Grpc_Testing_ServerArgs.OneOf_Argtype: @unchecked Sendable {}
  853. extension Grpc_Testing_ServerStatus: @unchecked Sendable {}
  854. extension Grpc_Testing_CoreRequest: @unchecked Sendable {}
  855. extension Grpc_Testing_CoreResponse: @unchecked Sendable {}
  856. extension Grpc_Testing_Void: @unchecked Sendable {}
  857. extension Grpc_Testing_Scenario: @unchecked Sendable {}
  858. extension Grpc_Testing_Scenarios: @unchecked Sendable {}
  859. extension Grpc_Testing_ScenarioResultSummary: @unchecked Sendable {}
  860. extension Grpc_Testing_ScenarioResult: @unchecked Sendable {}
  861. #endif // swift(>=5.5) && canImport(_Concurrency)
  862. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  863. fileprivate let _protobuf_package = "grpc.testing"
  864. extension Grpc_Testing_ClientType: SwiftProtobuf._ProtoNameProviding {
  865. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  866. 0: .same(proto: "SYNC_CLIENT"),
  867. 1: .same(proto: "ASYNC_CLIENT"),
  868. 2: .same(proto: "OTHER_CLIENT"),
  869. 3: .same(proto: "CALLBACK_CLIENT"),
  870. ]
  871. }
  872. extension Grpc_Testing_ServerType: SwiftProtobuf._ProtoNameProviding {
  873. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  874. 0: .same(proto: "SYNC_SERVER"),
  875. 1: .same(proto: "ASYNC_SERVER"),
  876. 2: .same(proto: "ASYNC_GENERIC_SERVER"),
  877. 3: .same(proto: "OTHER_SERVER"),
  878. 4: .same(proto: "CALLBACK_SERVER"),
  879. ]
  880. }
  881. extension Grpc_Testing_RpcType: SwiftProtobuf._ProtoNameProviding {
  882. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  883. 0: .same(proto: "UNARY"),
  884. 1: .same(proto: "STREAMING"),
  885. 2: .same(proto: "STREAMING_FROM_CLIENT"),
  886. 3: .same(proto: "STREAMING_FROM_SERVER"),
  887. 4: .same(proto: "STREAMING_BOTH_WAYS"),
  888. ]
  889. }
  890. extension Grpc_Testing_PoissonParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  891. static let protoMessageName: String = _protobuf_package + ".PoissonParams"
  892. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  893. 1: .standard(proto: "offered_load"),
  894. ]
  895. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  896. while let fieldNumber = try decoder.nextFieldNumber() {
  897. // The use of inline closures is to circumvent an issue where the compiler
  898. // allocates stack space for every case branch when no optimizations are
  899. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  900. switch fieldNumber {
  901. case 1: try { try decoder.decodeSingularDoubleField(value: &self.offeredLoad) }()
  902. default: break
  903. }
  904. }
  905. }
  906. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  907. if self.offeredLoad != 0 {
  908. try visitor.visitSingularDoubleField(value: self.offeredLoad, fieldNumber: 1)
  909. }
  910. try unknownFields.traverse(visitor: &visitor)
  911. }
  912. static func ==(lhs: Grpc_Testing_PoissonParams, rhs: Grpc_Testing_PoissonParams) -> Bool {
  913. if lhs.offeredLoad != rhs.offeredLoad {return false}
  914. if lhs.unknownFields != rhs.unknownFields {return false}
  915. return true
  916. }
  917. }
  918. extension Grpc_Testing_ClosedLoopParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  919. static let protoMessageName: String = _protobuf_package + ".ClosedLoopParams"
  920. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  921. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  922. while let _ = try decoder.nextFieldNumber() {
  923. }
  924. }
  925. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  926. try unknownFields.traverse(visitor: &visitor)
  927. }
  928. static func ==(lhs: Grpc_Testing_ClosedLoopParams, rhs: Grpc_Testing_ClosedLoopParams) -> Bool {
  929. if lhs.unknownFields != rhs.unknownFields {return false}
  930. return true
  931. }
  932. }
  933. extension Grpc_Testing_LoadParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  934. static let protoMessageName: String = _protobuf_package + ".LoadParams"
  935. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  936. 1: .standard(proto: "closed_loop"),
  937. 2: .same(proto: "poisson"),
  938. ]
  939. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  940. while let fieldNumber = try decoder.nextFieldNumber() {
  941. // The use of inline closures is to circumvent an issue where the compiler
  942. // allocates stack space for every case branch when no optimizations are
  943. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  944. switch fieldNumber {
  945. case 1: try {
  946. var v: Grpc_Testing_ClosedLoopParams?
  947. var hadOneofValue = false
  948. if let current = self.load {
  949. hadOneofValue = true
  950. if case .closedLoop(let m) = current {v = m}
  951. }
  952. try decoder.decodeSingularMessageField(value: &v)
  953. if let v = v {
  954. if hadOneofValue {try decoder.handleConflictingOneOf()}
  955. self.load = .closedLoop(v)
  956. }
  957. }()
  958. case 2: try {
  959. var v: Grpc_Testing_PoissonParams?
  960. var hadOneofValue = false
  961. if let current = self.load {
  962. hadOneofValue = true
  963. if case .poisson(let m) = current {v = m}
  964. }
  965. try decoder.decodeSingularMessageField(value: &v)
  966. if let v = v {
  967. if hadOneofValue {try decoder.handleConflictingOneOf()}
  968. self.load = .poisson(v)
  969. }
  970. }()
  971. default: break
  972. }
  973. }
  974. }
  975. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  976. // The use of inline closures is to circumvent an issue where the compiler
  977. // allocates stack space for every if/case branch local when no optimizations
  978. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  979. // https://github.com/apple/swift-protobuf/issues/1182
  980. switch self.load {
  981. case .closedLoop?: try {
  982. guard case .closedLoop(let v)? = self.load else { preconditionFailure() }
  983. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  984. }()
  985. case .poisson?: try {
  986. guard case .poisson(let v)? = self.load else { preconditionFailure() }
  987. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  988. }()
  989. case nil: break
  990. }
  991. try unknownFields.traverse(visitor: &visitor)
  992. }
  993. static func ==(lhs: Grpc_Testing_LoadParams, rhs: Grpc_Testing_LoadParams) -> Bool {
  994. if lhs.load != rhs.load {return false}
  995. if lhs.unknownFields != rhs.unknownFields {return false}
  996. return true
  997. }
  998. }
  999. extension Grpc_Testing_SecurityParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1000. static let protoMessageName: String = _protobuf_package + ".SecurityParams"
  1001. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1002. 1: .standard(proto: "use_test_ca"),
  1003. 2: .standard(proto: "server_host_override"),
  1004. 3: .standard(proto: "cred_type"),
  1005. ]
  1006. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1007. while let fieldNumber = try decoder.nextFieldNumber() {
  1008. // The use of inline closures is to circumvent an issue where the compiler
  1009. // allocates stack space for every case branch when no optimizations are
  1010. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1011. switch fieldNumber {
  1012. case 1: try { try decoder.decodeSingularBoolField(value: &self.useTestCa) }()
  1013. case 2: try { try decoder.decodeSingularStringField(value: &self.serverHostOverride) }()
  1014. case 3: try { try decoder.decodeSingularStringField(value: &self.credType) }()
  1015. default: break
  1016. }
  1017. }
  1018. }
  1019. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1020. if self.useTestCa != false {
  1021. try visitor.visitSingularBoolField(value: self.useTestCa, fieldNumber: 1)
  1022. }
  1023. if !self.serverHostOverride.isEmpty {
  1024. try visitor.visitSingularStringField(value: self.serverHostOverride, fieldNumber: 2)
  1025. }
  1026. if !self.credType.isEmpty {
  1027. try visitor.visitSingularStringField(value: self.credType, fieldNumber: 3)
  1028. }
  1029. try unknownFields.traverse(visitor: &visitor)
  1030. }
  1031. static func ==(lhs: Grpc_Testing_SecurityParams, rhs: Grpc_Testing_SecurityParams) -> Bool {
  1032. if lhs.useTestCa != rhs.useTestCa {return false}
  1033. if lhs.serverHostOverride != rhs.serverHostOverride {return false}
  1034. if lhs.credType != rhs.credType {return false}
  1035. if lhs.unknownFields != rhs.unknownFields {return false}
  1036. return true
  1037. }
  1038. }
  1039. extension Grpc_Testing_ChannelArg: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1040. static let protoMessageName: String = _protobuf_package + ".ChannelArg"
  1041. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1042. 1: .same(proto: "name"),
  1043. 2: .standard(proto: "str_value"),
  1044. 3: .standard(proto: "int_value"),
  1045. ]
  1046. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1047. while let fieldNumber = try decoder.nextFieldNumber() {
  1048. // The use of inline closures is to circumvent an issue where the compiler
  1049. // allocates stack space for every case branch when no optimizations are
  1050. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1051. switch fieldNumber {
  1052. case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
  1053. case 2: try {
  1054. var v: String?
  1055. try decoder.decodeSingularStringField(value: &v)
  1056. if let v = v {
  1057. if self.value != nil {try decoder.handleConflictingOneOf()}
  1058. self.value = .strValue(v)
  1059. }
  1060. }()
  1061. case 3: try {
  1062. var v: Int32?
  1063. try decoder.decodeSingularInt32Field(value: &v)
  1064. if let v = v {
  1065. if self.value != nil {try decoder.handleConflictingOneOf()}
  1066. self.value = .intValue(v)
  1067. }
  1068. }()
  1069. default: break
  1070. }
  1071. }
  1072. }
  1073. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1074. // The use of inline closures is to circumvent an issue where the compiler
  1075. // allocates stack space for every if/case branch local when no optimizations
  1076. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1077. // https://github.com/apple/swift-protobuf/issues/1182
  1078. if !self.name.isEmpty {
  1079. try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
  1080. }
  1081. switch self.value {
  1082. case .strValue?: try {
  1083. guard case .strValue(let v)? = self.value else { preconditionFailure() }
  1084. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  1085. }()
  1086. case .intValue?: try {
  1087. guard case .intValue(let v)? = self.value else { preconditionFailure() }
  1088. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  1089. }()
  1090. case nil: break
  1091. }
  1092. try unknownFields.traverse(visitor: &visitor)
  1093. }
  1094. static func ==(lhs: Grpc_Testing_ChannelArg, rhs: Grpc_Testing_ChannelArg) -> Bool {
  1095. if lhs.name != rhs.name {return false}
  1096. if lhs.value != rhs.value {return false}
  1097. if lhs.unknownFields != rhs.unknownFields {return false}
  1098. return true
  1099. }
  1100. }
  1101. extension Grpc_Testing_ClientConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1102. static let protoMessageName: String = _protobuf_package + ".ClientConfig"
  1103. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1104. 1: .standard(proto: "server_targets"),
  1105. 2: .standard(proto: "client_type"),
  1106. 3: .standard(proto: "security_params"),
  1107. 4: .standard(proto: "outstanding_rpcs_per_channel"),
  1108. 5: .standard(proto: "client_channels"),
  1109. 7: .standard(proto: "async_client_threads"),
  1110. 8: .standard(proto: "rpc_type"),
  1111. 10: .standard(proto: "load_params"),
  1112. 11: .standard(proto: "payload_config"),
  1113. 12: .standard(proto: "histogram_params"),
  1114. 13: .standard(proto: "core_list"),
  1115. 14: .standard(proto: "core_limit"),
  1116. 15: .standard(proto: "other_client_api"),
  1117. 16: .standard(proto: "channel_args"),
  1118. 17: .standard(proto: "threads_per_cq"),
  1119. 18: .standard(proto: "messages_per_stream"),
  1120. 19: .standard(proto: "use_coalesce_api"),
  1121. 20: .standard(proto: "median_latency_collection_interval_millis"),
  1122. 21: .standard(proto: "client_processes"),
  1123. ]
  1124. fileprivate class _StorageClass {
  1125. var _serverTargets: [String] = []
  1126. var _clientType: Grpc_Testing_ClientType = .syncClient
  1127. var _securityParams: Grpc_Testing_SecurityParams? = nil
  1128. var _outstandingRpcsPerChannel: Int32 = 0
  1129. var _clientChannels: Int32 = 0
  1130. var _asyncClientThreads: Int32 = 0
  1131. var _rpcType: Grpc_Testing_RpcType = .unary
  1132. var _loadParams: Grpc_Testing_LoadParams? = nil
  1133. var _payloadConfig: Grpc_Testing_PayloadConfig? = nil
  1134. var _histogramParams: Grpc_Testing_HistogramParams? = nil
  1135. var _coreList: [Int32] = []
  1136. var _coreLimit: Int32 = 0
  1137. var _otherClientApi: String = String()
  1138. var _channelArgs: [Grpc_Testing_ChannelArg] = []
  1139. var _threadsPerCq: Int32 = 0
  1140. var _messagesPerStream: Int32 = 0
  1141. var _useCoalesceApi: Bool = false
  1142. var _medianLatencyCollectionIntervalMillis: Int32 = 0
  1143. var _clientProcesses: Int32 = 0
  1144. #if swift(>=5.10)
  1145. // This property is used as the initial default value for new instances of the type.
  1146. // The type itself is protecting the reference to its storage via CoW semantics.
  1147. // This will force a copy to be made of this reference when the first mutation occurs;
  1148. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1149. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1150. #else
  1151. static let defaultInstance = _StorageClass()
  1152. #endif
  1153. private init() {}
  1154. init(copying source: _StorageClass) {
  1155. _serverTargets = source._serverTargets
  1156. _clientType = source._clientType
  1157. _securityParams = source._securityParams
  1158. _outstandingRpcsPerChannel = source._outstandingRpcsPerChannel
  1159. _clientChannels = source._clientChannels
  1160. _asyncClientThreads = source._asyncClientThreads
  1161. _rpcType = source._rpcType
  1162. _loadParams = source._loadParams
  1163. _payloadConfig = source._payloadConfig
  1164. _histogramParams = source._histogramParams
  1165. _coreList = source._coreList
  1166. _coreLimit = source._coreLimit
  1167. _otherClientApi = source._otherClientApi
  1168. _channelArgs = source._channelArgs
  1169. _threadsPerCq = source._threadsPerCq
  1170. _messagesPerStream = source._messagesPerStream
  1171. _useCoalesceApi = source._useCoalesceApi
  1172. _medianLatencyCollectionIntervalMillis = source._medianLatencyCollectionIntervalMillis
  1173. _clientProcesses = source._clientProcesses
  1174. }
  1175. }
  1176. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1177. if !isKnownUniquelyReferenced(&_storage) {
  1178. _storage = _StorageClass(copying: _storage)
  1179. }
  1180. return _storage
  1181. }
  1182. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1183. _ = _uniqueStorage()
  1184. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1185. while let fieldNumber = try decoder.nextFieldNumber() {
  1186. // The use of inline closures is to circumvent an issue where the compiler
  1187. // allocates stack space for every case branch when no optimizations are
  1188. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1189. switch fieldNumber {
  1190. case 1: try { try decoder.decodeRepeatedStringField(value: &_storage._serverTargets) }()
  1191. case 2: try { try decoder.decodeSingularEnumField(value: &_storage._clientType) }()
  1192. case 3: try { try decoder.decodeSingularMessageField(value: &_storage._securityParams) }()
  1193. case 4: try { try decoder.decodeSingularInt32Field(value: &_storage._outstandingRpcsPerChannel) }()
  1194. case 5: try { try decoder.decodeSingularInt32Field(value: &_storage._clientChannels) }()
  1195. case 7: try { try decoder.decodeSingularInt32Field(value: &_storage._asyncClientThreads) }()
  1196. case 8: try { try decoder.decodeSingularEnumField(value: &_storage._rpcType) }()
  1197. case 10: try { try decoder.decodeSingularMessageField(value: &_storage._loadParams) }()
  1198. case 11: try { try decoder.decodeSingularMessageField(value: &_storage._payloadConfig) }()
  1199. case 12: try { try decoder.decodeSingularMessageField(value: &_storage._histogramParams) }()
  1200. case 13: try { try decoder.decodeRepeatedInt32Field(value: &_storage._coreList) }()
  1201. case 14: try { try decoder.decodeSingularInt32Field(value: &_storage._coreLimit) }()
  1202. case 15: try { try decoder.decodeSingularStringField(value: &_storage._otherClientApi) }()
  1203. case 16: try { try decoder.decodeRepeatedMessageField(value: &_storage._channelArgs) }()
  1204. case 17: try { try decoder.decodeSingularInt32Field(value: &_storage._threadsPerCq) }()
  1205. case 18: try { try decoder.decodeSingularInt32Field(value: &_storage._messagesPerStream) }()
  1206. case 19: try { try decoder.decodeSingularBoolField(value: &_storage._useCoalesceApi) }()
  1207. case 20: try { try decoder.decodeSingularInt32Field(value: &_storage._medianLatencyCollectionIntervalMillis) }()
  1208. case 21: try { try decoder.decodeSingularInt32Field(value: &_storage._clientProcesses) }()
  1209. default: break
  1210. }
  1211. }
  1212. }
  1213. }
  1214. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1215. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1216. // The use of inline closures is to circumvent an issue where the compiler
  1217. // allocates stack space for every if/case branch local when no optimizations
  1218. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1219. // https://github.com/apple/swift-protobuf/issues/1182
  1220. if !_storage._serverTargets.isEmpty {
  1221. try visitor.visitRepeatedStringField(value: _storage._serverTargets, fieldNumber: 1)
  1222. }
  1223. if _storage._clientType != .syncClient {
  1224. try visitor.visitSingularEnumField(value: _storage._clientType, fieldNumber: 2)
  1225. }
  1226. try { if let v = _storage._securityParams {
  1227. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1228. } }()
  1229. if _storage._outstandingRpcsPerChannel != 0 {
  1230. try visitor.visitSingularInt32Field(value: _storage._outstandingRpcsPerChannel, fieldNumber: 4)
  1231. }
  1232. if _storage._clientChannels != 0 {
  1233. try visitor.visitSingularInt32Field(value: _storage._clientChannels, fieldNumber: 5)
  1234. }
  1235. if _storage._asyncClientThreads != 0 {
  1236. try visitor.visitSingularInt32Field(value: _storage._asyncClientThreads, fieldNumber: 7)
  1237. }
  1238. if _storage._rpcType != .unary {
  1239. try visitor.visitSingularEnumField(value: _storage._rpcType, fieldNumber: 8)
  1240. }
  1241. try { if let v = _storage._loadParams {
  1242. try visitor.visitSingularMessageField(value: v, fieldNumber: 10)
  1243. } }()
  1244. try { if let v = _storage._payloadConfig {
  1245. try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
  1246. } }()
  1247. try { if let v = _storage._histogramParams {
  1248. try visitor.visitSingularMessageField(value: v, fieldNumber: 12)
  1249. } }()
  1250. if !_storage._coreList.isEmpty {
  1251. try visitor.visitPackedInt32Field(value: _storage._coreList, fieldNumber: 13)
  1252. }
  1253. if _storage._coreLimit != 0 {
  1254. try visitor.visitSingularInt32Field(value: _storage._coreLimit, fieldNumber: 14)
  1255. }
  1256. if !_storage._otherClientApi.isEmpty {
  1257. try visitor.visitSingularStringField(value: _storage._otherClientApi, fieldNumber: 15)
  1258. }
  1259. if !_storage._channelArgs.isEmpty {
  1260. try visitor.visitRepeatedMessageField(value: _storage._channelArgs, fieldNumber: 16)
  1261. }
  1262. if _storage._threadsPerCq != 0 {
  1263. try visitor.visitSingularInt32Field(value: _storage._threadsPerCq, fieldNumber: 17)
  1264. }
  1265. if _storage._messagesPerStream != 0 {
  1266. try visitor.visitSingularInt32Field(value: _storage._messagesPerStream, fieldNumber: 18)
  1267. }
  1268. if _storage._useCoalesceApi != false {
  1269. try visitor.visitSingularBoolField(value: _storage._useCoalesceApi, fieldNumber: 19)
  1270. }
  1271. if _storage._medianLatencyCollectionIntervalMillis != 0 {
  1272. try visitor.visitSingularInt32Field(value: _storage._medianLatencyCollectionIntervalMillis, fieldNumber: 20)
  1273. }
  1274. if _storage._clientProcesses != 0 {
  1275. try visitor.visitSingularInt32Field(value: _storage._clientProcesses, fieldNumber: 21)
  1276. }
  1277. }
  1278. try unknownFields.traverse(visitor: &visitor)
  1279. }
  1280. static func ==(lhs: Grpc_Testing_ClientConfig, rhs: Grpc_Testing_ClientConfig) -> Bool {
  1281. if lhs._storage !== rhs._storage {
  1282. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1283. let _storage = _args.0
  1284. let rhs_storage = _args.1
  1285. if _storage._serverTargets != rhs_storage._serverTargets {return false}
  1286. if _storage._clientType != rhs_storage._clientType {return false}
  1287. if _storage._securityParams != rhs_storage._securityParams {return false}
  1288. if _storage._outstandingRpcsPerChannel != rhs_storage._outstandingRpcsPerChannel {return false}
  1289. if _storage._clientChannels != rhs_storage._clientChannels {return false}
  1290. if _storage._asyncClientThreads != rhs_storage._asyncClientThreads {return false}
  1291. if _storage._rpcType != rhs_storage._rpcType {return false}
  1292. if _storage._loadParams != rhs_storage._loadParams {return false}
  1293. if _storage._payloadConfig != rhs_storage._payloadConfig {return false}
  1294. if _storage._histogramParams != rhs_storage._histogramParams {return false}
  1295. if _storage._coreList != rhs_storage._coreList {return false}
  1296. if _storage._coreLimit != rhs_storage._coreLimit {return false}
  1297. if _storage._otherClientApi != rhs_storage._otherClientApi {return false}
  1298. if _storage._channelArgs != rhs_storage._channelArgs {return false}
  1299. if _storage._threadsPerCq != rhs_storage._threadsPerCq {return false}
  1300. if _storage._messagesPerStream != rhs_storage._messagesPerStream {return false}
  1301. if _storage._useCoalesceApi != rhs_storage._useCoalesceApi {return false}
  1302. if _storage._medianLatencyCollectionIntervalMillis != rhs_storage._medianLatencyCollectionIntervalMillis {return false}
  1303. if _storage._clientProcesses != rhs_storage._clientProcesses {return false}
  1304. return true
  1305. }
  1306. if !storagesAreEqual {return false}
  1307. }
  1308. if lhs.unknownFields != rhs.unknownFields {return false}
  1309. return true
  1310. }
  1311. }
  1312. extension Grpc_Testing_ClientStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1313. static let protoMessageName: String = _protobuf_package + ".ClientStatus"
  1314. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1315. 1: .same(proto: "stats"),
  1316. ]
  1317. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1318. while let fieldNumber = try decoder.nextFieldNumber() {
  1319. // The use of inline closures is to circumvent an issue where the compiler
  1320. // allocates stack space for every case branch when no optimizations are
  1321. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1322. switch fieldNumber {
  1323. case 1: try { try decoder.decodeSingularMessageField(value: &self._stats) }()
  1324. default: break
  1325. }
  1326. }
  1327. }
  1328. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1329. // The use of inline closures is to circumvent an issue where the compiler
  1330. // allocates stack space for every if/case branch local when no optimizations
  1331. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1332. // https://github.com/apple/swift-protobuf/issues/1182
  1333. try { if let v = self._stats {
  1334. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1335. } }()
  1336. try unknownFields.traverse(visitor: &visitor)
  1337. }
  1338. static func ==(lhs: Grpc_Testing_ClientStatus, rhs: Grpc_Testing_ClientStatus) -> Bool {
  1339. if lhs._stats != rhs._stats {return false}
  1340. if lhs.unknownFields != rhs.unknownFields {return false}
  1341. return true
  1342. }
  1343. }
  1344. extension Grpc_Testing_Mark: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1345. static let protoMessageName: String = _protobuf_package + ".Mark"
  1346. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1347. 1: .same(proto: "reset"),
  1348. ]
  1349. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1350. while let fieldNumber = try decoder.nextFieldNumber() {
  1351. // The use of inline closures is to circumvent an issue where the compiler
  1352. // allocates stack space for every case branch when no optimizations are
  1353. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1354. switch fieldNumber {
  1355. case 1: try { try decoder.decodeSingularBoolField(value: &self.reset) }()
  1356. default: break
  1357. }
  1358. }
  1359. }
  1360. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1361. if self.reset != false {
  1362. try visitor.visitSingularBoolField(value: self.reset, fieldNumber: 1)
  1363. }
  1364. try unknownFields.traverse(visitor: &visitor)
  1365. }
  1366. static func ==(lhs: Grpc_Testing_Mark, rhs: Grpc_Testing_Mark) -> Bool {
  1367. if lhs.reset != rhs.reset {return false}
  1368. if lhs.unknownFields != rhs.unknownFields {return false}
  1369. return true
  1370. }
  1371. }
  1372. extension Grpc_Testing_ClientArgs: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1373. static let protoMessageName: String = _protobuf_package + ".ClientArgs"
  1374. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1375. 1: .same(proto: "setup"),
  1376. 2: .same(proto: "mark"),
  1377. ]
  1378. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1379. while let fieldNumber = try decoder.nextFieldNumber() {
  1380. // The use of inline closures is to circumvent an issue where the compiler
  1381. // allocates stack space for every case branch when no optimizations are
  1382. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1383. switch fieldNumber {
  1384. case 1: try {
  1385. var v: Grpc_Testing_ClientConfig?
  1386. var hadOneofValue = false
  1387. if let current = self.argtype {
  1388. hadOneofValue = true
  1389. if case .setup(let m) = current {v = m}
  1390. }
  1391. try decoder.decodeSingularMessageField(value: &v)
  1392. if let v = v {
  1393. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1394. self.argtype = .setup(v)
  1395. }
  1396. }()
  1397. case 2: try {
  1398. var v: Grpc_Testing_Mark?
  1399. var hadOneofValue = false
  1400. if let current = self.argtype {
  1401. hadOneofValue = true
  1402. if case .mark(let m) = current {v = m}
  1403. }
  1404. try decoder.decodeSingularMessageField(value: &v)
  1405. if let v = v {
  1406. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1407. self.argtype = .mark(v)
  1408. }
  1409. }()
  1410. default: break
  1411. }
  1412. }
  1413. }
  1414. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1415. // The use of inline closures is to circumvent an issue where the compiler
  1416. // allocates stack space for every if/case branch local when no optimizations
  1417. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1418. // https://github.com/apple/swift-protobuf/issues/1182
  1419. switch self.argtype {
  1420. case .setup?: try {
  1421. guard case .setup(let v)? = self.argtype else { preconditionFailure() }
  1422. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1423. }()
  1424. case .mark?: try {
  1425. guard case .mark(let v)? = self.argtype else { preconditionFailure() }
  1426. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1427. }()
  1428. case nil: break
  1429. }
  1430. try unknownFields.traverse(visitor: &visitor)
  1431. }
  1432. static func ==(lhs: Grpc_Testing_ClientArgs, rhs: Grpc_Testing_ClientArgs) -> Bool {
  1433. if lhs.argtype != rhs.argtype {return false}
  1434. if lhs.unknownFields != rhs.unknownFields {return false}
  1435. return true
  1436. }
  1437. }
  1438. extension Grpc_Testing_ServerConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1439. static let protoMessageName: String = _protobuf_package + ".ServerConfig"
  1440. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1441. 1: .standard(proto: "server_type"),
  1442. 2: .standard(proto: "security_params"),
  1443. 4: .same(proto: "port"),
  1444. 7: .standard(proto: "async_server_threads"),
  1445. 8: .standard(proto: "core_limit"),
  1446. 9: .standard(proto: "payload_config"),
  1447. 10: .standard(proto: "core_list"),
  1448. 11: .standard(proto: "other_server_api"),
  1449. 12: .standard(proto: "threads_per_cq"),
  1450. 1001: .standard(proto: "resource_quota_size"),
  1451. 1002: .standard(proto: "channel_args"),
  1452. 21: .standard(proto: "server_processes"),
  1453. ]
  1454. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1455. while let fieldNumber = try decoder.nextFieldNumber() {
  1456. // The use of inline closures is to circumvent an issue where the compiler
  1457. // allocates stack space for every case branch when no optimizations are
  1458. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1459. switch fieldNumber {
  1460. case 1: try { try decoder.decodeSingularEnumField(value: &self.serverType) }()
  1461. case 2: try { try decoder.decodeSingularMessageField(value: &self._securityParams) }()
  1462. case 4: try { try decoder.decodeSingularInt32Field(value: &self.port) }()
  1463. case 7: try { try decoder.decodeSingularInt32Field(value: &self.asyncServerThreads) }()
  1464. case 8: try { try decoder.decodeSingularInt32Field(value: &self.coreLimit) }()
  1465. case 9: try { try decoder.decodeSingularMessageField(value: &self._payloadConfig) }()
  1466. case 10: try { try decoder.decodeRepeatedInt32Field(value: &self.coreList) }()
  1467. case 11: try { try decoder.decodeSingularStringField(value: &self.otherServerApi) }()
  1468. case 12: try { try decoder.decodeSingularInt32Field(value: &self.threadsPerCq) }()
  1469. case 21: try { try decoder.decodeSingularInt32Field(value: &self.serverProcesses) }()
  1470. case 1001: try { try decoder.decodeSingularInt32Field(value: &self.resourceQuotaSize) }()
  1471. case 1002: try { try decoder.decodeRepeatedMessageField(value: &self.channelArgs) }()
  1472. default: break
  1473. }
  1474. }
  1475. }
  1476. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1477. // The use of inline closures is to circumvent an issue where the compiler
  1478. // allocates stack space for every if/case branch local when no optimizations
  1479. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1480. // https://github.com/apple/swift-protobuf/issues/1182
  1481. if self.serverType != .syncServer {
  1482. try visitor.visitSingularEnumField(value: self.serverType, fieldNumber: 1)
  1483. }
  1484. try { if let v = self._securityParams {
  1485. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1486. } }()
  1487. if self.port != 0 {
  1488. try visitor.visitSingularInt32Field(value: self.port, fieldNumber: 4)
  1489. }
  1490. if self.asyncServerThreads != 0 {
  1491. try visitor.visitSingularInt32Field(value: self.asyncServerThreads, fieldNumber: 7)
  1492. }
  1493. if self.coreLimit != 0 {
  1494. try visitor.visitSingularInt32Field(value: self.coreLimit, fieldNumber: 8)
  1495. }
  1496. try { if let v = self._payloadConfig {
  1497. try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
  1498. } }()
  1499. if !self.coreList.isEmpty {
  1500. try visitor.visitPackedInt32Field(value: self.coreList, fieldNumber: 10)
  1501. }
  1502. if !self.otherServerApi.isEmpty {
  1503. try visitor.visitSingularStringField(value: self.otherServerApi, fieldNumber: 11)
  1504. }
  1505. if self.threadsPerCq != 0 {
  1506. try visitor.visitSingularInt32Field(value: self.threadsPerCq, fieldNumber: 12)
  1507. }
  1508. if self.serverProcesses != 0 {
  1509. try visitor.visitSingularInt32Field(value: self.serverProcesses, fieldNumber: 21)
  1510. }
  1511. if self.resourceQuotaSize != 0 {
  1512. try visitor.visitSingularInt32Field(value: self.resourceQuotaSize, fieldNumber: 1001)
  1513. }
  1514. if !self.channelArgs.isEmpty {
  1515. try visitor.visitRepeatedMessageField(value: self.channelArgs, fieldNumber: 1002)
  1516. }
  1517. try unknownFields.traverse(visitor: &visitor)
  1518. }
  1519. static func ==(lhs: Grpc_Testing_ServerConfig, rhs: Grpc_Testing_ServerConfig) -> Bool {
  1520. if lhs.serverType != rhs.serverType {return false}
  1521. if lhs._securityParams != rhs._securityParams {return false}
  1522. if lhs.port != rhs.port {return false}
  1523. if lhs.asyncServerThreads != rhs.asyncServerThreads {return false}
  1524. if lhs.coreLimit != rhs.coreLimit {return false}
  1525. if lhs._payloadConfig != rhs._payloadConfig {return false}
  1526. if lhs.coreList != rhs.coreList {return false}
  1527. if lhs.otherServerApi != rhs.otherServerApi {return false}
  1528. if lhs.threadsPerCq != rhs.threadsPerCq {return false}
  1529. if lhs.resourceQuotaSize != rhs.resourceQuotaSize {return false}
  1530. if lhs.channelArgs != rhs.channelArgs {return false}
  1531. if lhs.serverProcesses != rhs.serverProcesses {return false}
  1532. if lhs.unknownFields != rhs.unknownFields {return false}
  1533. return true
  1534. }
  1535. }
  1536. extension Grpc_Testing_ServerArgs: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1537. static let protoMessageName: String = _protobuf_package + ".ServerArgs"
  1538. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1539. 1: .same(proto: "setup"),
  1540. 2: .same(proto: "mark"),
  1541. ]
  1542. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1543. while let fieldNumber = try decoder.nextFieldNumber() {
  1544. // The use of inline closures is to circumvent an issue where the compiler
  1545. // allocates stack space for every case branch when no optimizations are
  1546. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1547. switch fieldNumber {
  1548. case 1: try {
  1549. var v: Grpc_Testing_ServerConfig?
  1550. var hadOneofValue = false
  1551. if let current = self.argtype {
  1552. hadOneofValue = true
  1553. if case .setup(let m) = current {v = m}
  1554. }
  1555. try decoder.decodeSingularMessageField(value: &v)
  1556. if let v = v {
  1557. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1558. self.argtype = .setup(v)
  1559. }
  1560. }()
  1561. case 2: try {
  1562. var v: Grpc_Testing_Mark?
  1563. var hadOneofValue = false
  1564. if let current = self.argtype {
  1565. hadOneofValue = true
  1566. if case .mark(let m) = current {v = m}
  1567. }
  1568. try decoder.decodeSingularMessageField(value: &v)
  1569. if let v = v {
  1570. if hadOneofValue {try decoder.handleConflictingOneOf()}
  1571. self.argtype = .mark(v)
  1572. }
  1573. }()
  1574. default: break
  1575. }
  1576. }
  1577. }
  1578. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1579. // The use of inline closures is to circumvent an issue where the compiler
  1580. // allocates stack space for every if/case branch local when no optimizations
  1581. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1582. // https://github.com/apple/swift-protobuf/issues/1182
  1583. switch self.argtype {
  1584. case .setup?: try {
  1585. guard case .setup(let v)? = self.argtype else { preconditionFailure() }
  1586. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1587. }()
  1588. case .mark?: try {
  1589. guard case .mark(let v)? = self.argtype else { preconditionFailure() }
  1590. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1591. }()
  1592. case nil: break
  1593. }
  1594. try unknownFields.traverse(visitor: &visitor)
  1595. }
  1596. static func ==(lhs: Grpc_Testing_ServerArgs, rhs: Grpc_Testing_ServerArgs) -> Bool {
  1597. if lhs.argtype != rhs.argtype {return false}
  1598. if lhs.unknownFields != rhs.unknownFields {return false}
  1599. return true
  1600. }
  1601. }
  1602. extension Grpc_Testing_ServerStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1603. static let protoMessageName: String = _protobuf_package + ".ServerStatus"
  1604. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1605. 1: .same(proto: "stats"),
  1606. 2: .same(proto: "port"),
  1607. 3: .same(proto: "cores"),
  1608. ]
  1609. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1610. while let fieldNumber = try decoder.nextFieldNumber() {
  1611. // The use of inline closures is to circumvent an issue where the compiler
  1612. // allocates stack space for every case branch when no optimizations are
  1613. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1614. switch fieldNumber {
  1615. case 1: try { try decoder.decodeSingularMessageField(value: &self._stats) }()
  1616. case 2: try { try decoder.decodeSingularInt32Field(value: &self.port) }()
  1617. case 3: try { try decoder.decodeSingularInt32Field(value: &self.cores) }()
  1618. default: break
  1619. }
  1620. }
  1621. }
  1622. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1623. // The use of inline closures is to circumvent an issue where the compiler
  1624. // allocates stack space for every if/case branch local when no optimizations
  1625. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1626. // https://github.com/apple/swift-protobuf/issues/1182
  1627. try { if let v = self._stats {
  1628. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1629. } }()
  1630. if self.port != 0 {
  1631. try visitor.visitSingularInt32Field(value: self.port, fieldNumber: 2)
  1632. }
  1633. if self.cores != 0 {
  1634. try visitor.visitSingularInt32Field(value: self.cores, fieldNumber: 3)
  1635. }
  1636. try unknownFields.traverse(visitor: &visitor)
  1637. }
  1638. static func ==(lhs: Grpc_Testing_ServerStatus, rhs: Grpc_Testing_ServerStatus) -> Bool {
  1639. if lhs._stats != rhs._stats {return false}
  1640. if lhs.port != rhs.port {return false}
  1641. if lhs.cores != rhs.cores {return false}
  1642. if lhs.unknownFields != rhs.unknownFields {return false}
  1643. return true
  1644. }
  1645. }
  1646. extension Grpc_Testing_CoreRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1647. static let protoMessageName: String = _protobuf_package + ".CoreRequest"
  1648. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1649. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1650. while let _ = try decoder.nextFieldNumber() {
  1651. }
  1652. }
  1653. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1654. try unknownFields.traverse(visitor: &visitor)
  1655. }
  1656. static func ==(lhs: Grpc_Testing_CoreRequest, rhs: Grpc_Testing_CoreRequest) -> Bool {
  1657. if lhs.unknownFields != rhs.unknownFields {return false}
  1658. return true
  1659. }
  1660. }
  1661. extension Grpc_Testing_CoreResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1662. static let protoMessageName: String = _protobuf_package + ".CoreResponse"
  1663. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1664. 1: .same(proto: "cores"),
  1665. ]
  1666. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1667. while let fieldNumber = try decoder.nextFieldNumber() {
  1668. // The use of inline closures is to circumvent an issue where the compiler
  1669. // allocates stack space for every case branch when no optimizations are
  1670. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1671. switch fieldNumber {
  1672. case 1: try { try decoder.decodeSingularInt32Field(value: &self.cores) }()
  1673. default: break
  1674. }
  1675. }
  1676. }
  1677. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1678. if self.cores != 0 {
  1679. try visitor.visitSingularInt32Field(value: self.cores, fieldNumber: 1)
  1680. }
  1681. try unknownFields.traverse(visitor: &visitor)
  1682. }
  1683. static func ==(lhs: Grpc_Testing_CoreResponse, rhs: Grpc_Testing_CoreResponse) -> Bool {
  1684. if lhs.cores != rhs.cores {return false}
  1685. if lhs.unknownFields != rhs.unknownFields {return false}
  1686. return true
  1687. }
  1688. }
  1689. extension Grpc_Testing_Void: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1690. static let protoMessageName: String = _protobuf_package + ".Void"
  1691. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1692. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1693. while let _ = try decoder.nextFieldNumber() {
  1694. }
  1695. }
  1696. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1697. try unknownFields.traverse(visitor: &visitor)
  1698. }
  1699. static func ==(lhs: Grpc_Testing_Void, rhs: Grpc_Testing_Void) -> Bool {
  1700. if lhs.unknownFields != rhs.unknownFields {return false}
  1701. return true
  1702. }
  1703. }
  1704. extension Grpc_Testing_Scenario: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1705. static let protoMessageName: String = _protobuf_package + ".Scenario"
  1706. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1707. 1: .same(proto: "name"),
  1708. 2: .standard(proto: "client_config"),
  1709. 3: .standard(proto: "num_clients"),
  1710. 4: .standard(proto: "server_config"),
  1711. 5: .standard(proto: "num_servers"),
  1712. 6: .standard(proto: "warmup_seconds"),
  1713. 7: .standard(proto: "benchmark_seconds"),
  1714. 8: .standard(proto: "spawn_local_worker_count"),
  1715. ]
  1716. fileprivate class _StorageClass {
  1717. var _name: String = String()
  1718. var _clientConfig: Grpc_Testing_ClientConfig? = nil
  1719. var _numClients: Int32 = 0
  1720. var _serverConfig: Grpc_Testing_ServerConfig? = nil
  1721. var _numServers: Int32 = 0
  1722. var _warmupSeconds: Int32 = 0
  1723. var _benchmarkSeconds: Int32 = 0
  1724. var _spawnLocalWorkerCount: Int32 = 0
  1725. #if swift(>=5.10)
  1726. // This property is used as the initial default value for new instances of the type.
  1727. // The type itself is protecting the reference to its storage via CoW semantics.
  1728. // This will force a copy to be made of this reference when the first mutation occurs;
  1729. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1730. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1731. #else
  1732. static let defaultInstance = _StorageClass()
  1733. #endif
  1734. private init() {}
  1735. init(copying source: _StorageClass) {
  1736. _name = source._name
  1737. _clientConfig = source._clientConfig
  1738. _numClients = source._numClients
  1739. _serverConfig = source._serverConfig
  1740. _numServers = source._numServers
  1741. _warmupSeconds = source._warmupSeconds
  1742. _benchmarkSeconds = source._benchmarkSeconds
  1743. _spawnLocalWorkerCount = source._spawnLocalWorkerCount
  1744. }
  1745. }
  1746. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1747. if !isKnownUniquelyReferenced(&_storage) {
  1748. _storage = _StorageClass(copying: _storage)
  1749. }
  1750. return _storage
  1751. }
  1752. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1753. _ = _uniqueStorage()
  1754. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1755. while let fieldNumber = try decoder.nextFieldNumber() {
  1756. // The use of inline closures is to circumvent an issue where the compiler
  1757. // allocates stack space for every case branch when no optimizations are
  1758. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1759. switch fieldNumber {
  1760. case 1: try { try decoder.decodeSingularStringField(value: &_storage._name) }()
  1761. case 2: try { try decoder.decodeSingularMessageField(value: &_storage._clientConfig) }()
  1762. case 3: try { try decoder.decodeSingularInt32Field(value: &_storage._numClients) }()
  1763. case 4: try { try decoder.decodeSingularMessageField(value: &_storage._serverConfig) }()
  1764. case 5: try { try decoder.decodeSingularInt32Field(value: &_storage._numServers) }()
  1765. case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._warmupSeconds) }()
  1766. case 7: try { try decoder.decodeSingularInt32Field(value: &_storage._benchmarkSeconds) }()
  1767. case 8: try { try decoder.decodeSingularInt32Field(value: &_storage._spawnLocalWorkerCount) }()
  1768. default: break
  1769. }
  1770. }
  1771. }
  1772. }
  1773. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1774. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1775. // The use of inline closures is to circumvent an issue where the compiler
  1776. // allocates stack space for every if/case branch local when no optimizations
  1777. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1778. // https://github.com/apple/swift-protobuf/issues/1182
  1779. if !_storage._name.isEmpty {
  1780. try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1)
  1781. }
  1782. try { if let v = _storage._clientConfig {
  1783. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1784. } }()
  1785. if _storage._numClients != 0 {
  1786. try visitor.visitSingularInt32Field(value: _storage._numClients, fieldNumber: 3)
  1787. }
  1788. try { if let v = _storage._serverConfig {
  1789. try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
  1790. } }()
  1791. if _storage._numServers != 0 {
  1792. try visitor.visitSingularInt32Field(value: _storage._numServers, fieldNumber: 5)
  1793. }
  1794. if _storage._warmupSeconds != 0 {
  1795. try visitor.visitSingularInt32Field(value: _storage._warmupSeconds, fieldNumber: 6)
  1796. }
  1797. if _storage._benchmarkSeconds != 0 {
  1798. try visitor.visitSingularInt32Field(value: _storage._benchmarkSeconds, fieldNumber: 7)
  1799. }
  1800. if _storage._spawnLocalWorkerCount != 0 {
  1801. try visitor.visitSingularInt32Field(value: _storage._spawnLocalWorkerCount, fieldNumber: 8)
  1802. }
  1803. }
  1804. try unknownFields.traverse(visitor: &visitor)
  1805. }
  1806. static func ==(lhs: Grpc_Testing_Scenario, rhs: Grpc_Testing_Scenario) -> Bool {
  1807. if lhs._storage !== rhs._storage {
  1808. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  1809. let _storage = _args.0
  1810. let rhs_storage = _args.1
  1811. if _storage._name != rhs_storage._name {return false}
  1812. if _storage._clientConfig != rhs_storage._clientConfig {return false}
  1813. if _storage._numClients != rhs_storage._numClients {return false}
  1814. if _storage._serverConfig != rhs_storage._serverConfig {return false}
  1815. if _storage._numServers != rhs_storage._numServers {return false}
  1816. if _storage._warmupSeconds != rhs_storage._warmupSeconds {return false}
  1817. if _storage._benchmarkSeconds != rhs_storage._benchmarkSeconds {return false}
  1818. if _storage._spawnLocalWorkerCount != rhs_storage._spawnLocalWorkerCount {return false}
  1819. return true
  1820. }
  1821. if !storagesAreEqual {return false}
  1822. }
  1823. if lhs.unknownFields != rhs.unknownFields {return false}
  1824. return true
  1825. }
  1826. }
  1827. extension Grpc_Testing_Scenarios: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1828. static let protoMessageName: String = _protobuf_package + ".Scenarios"
  1829. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1830. 1: .same(proto: "scenarios"),
  1831. ]
  1832. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1833. while let fieldNumber = try decoder.nextFieldNumber() {
  1834. // The use of inline closures is to circumvent an issue where the compiler
  1835. // allocates stack space for every case branch when no optimizations are
  1836. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1837. switch fieldNumber {
  1838. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.scenarios) }()
  1839. default: break
  1840. }
  1841. }
  1842. }
  1843. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1844. if !self.scenarios.isEmpty {
  1845. try visitor.visitRepeatedMessageField(value: self.scenarios, fieldNumber: 1)
  1846. }
  1847. try unknownFields.traverse(visitor: &visitor)
  1848. }
  1849. static func ==(lhs: Grpc_Testing_Scenarios, rhs: Grpc_Testing_Scenarios) -> Bool {
  1850. if lhs.scenarios != rhs.scenarios {return false}
  1851. if lhs.unknownFields != rhs.unknownFields {return false}
  1852. return true
  1853. }
  1854. }
  1855. extension Grpc_Testing_ScenarioResultSummary: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1856. static let protoMessageName: String = _protobuf_package + ".ScenarioResultSummary"
  1857. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1858. 1: .same(proto: "qps"),
  1859. 2: .standard(proto: "qps_per_server_core"),
  1860. 3: .standard(proto: "server_system_time"),
  1861. 4: .standard(proto: "server_user_time"),
  1862. 5: .standard(proto: "client_system_time"),
  1863. 6: .standard(proto: "client_user_time"),
  1864. 7: .standard(proto: "latency_50"),
  1865. 8: .standard(proto: "latency_90"),
  1866. 9: .standard(proto: "latency_95"),
  1867. 10: .standard(proto: "latency_99"),
  1868. 11: .standard(proto: "latency_999"),
  1869. 12: .standard(proto: "server_cpu_usage"),
  1870. 13: .standard(proto: "successful_requests_per_second"),
  1871. 14: .standard(proto: "failed_requests_per_second"),
  1872. 15: .standard(proto: "client_polls_per_request"),
  1873. 16: .standard(proto: "server_polls_per_request"),
  1874. 17: .standard(proto: "server_queries_per_cpu_sec"),
  1875. 18: .standard(proto: "client_queries_per_cpu_sec"),
  1876. 19: .standard(proto: "start_time"),
  1877. 20: .standard(proto: "end_time"),
  1878. ]
  1879. fileprivate class _StorageClass {
  1880. var _qps: Double = 0
  1881. var _qpsPerServerCore: Double = 0
  1882. var _serverSystemTime: Double = 0
  1883. var _serverUserTime: Double = 0
  1884. var _clientSystemTime: Double = 0
  1885. var _clientUserTime: Double = 0
  1886. var _latency50: Double = 0
  1887. var _latency90: Double = 0
  1888. var _latency95: Double = 0
  1889. var _latency99: Double = 0
  1890. var _latency999: Double = 0
  1891. var _serverCpuUsage: Double = 0
  1892. var _successfulRequestsPerSecond: Double = 0
  1893. var _failedRequestsPerSecond: Double = 0
  1894. var _clientPollsPerRequest: Double = 0
  1895. var _serverPollsPerRequest: Double = 0
  1896. var _serverQueriesPerCpuSec: Double = 0
  1897. var _clientQueriesPerCpuSec: Double = 0
  1898. var _startTime: SwiftProtobuf.Google_Protobuf_Timestamp? = nil
  1899. var _endTime: SwiftProtobuf.Google_Protobuf_Timestamp? = nil
  1900. #if swift(>=5.10)
  1901. // This property is used as the initial default value for new instances of the type.
  1902. // The type itself is protecting the reference to its storage via CoW semantics.
  1903. // This will force a copy to be made of this reference when the first mutation occurs;
  1904. // hence, it is safe to mark this as `nonisolated(unsafe)`.
  1905. static nonisolated(unsafe) let defaultInstance = _StorageClass()
  1906. #else
  1907. static let defaultInstance = _StorageClass()
  1908. #endif
  1909. private init() {}
  1910. init(copying source: _StorageClass) {
  1911. _qps = source._qps
  1912. _qpsPerServerCore = source._qpsPerServerCore
  1913. _serverSystemTime = source._serverSystemTime
  1914. _serverUserTime = source._serverUserTime
  1915. _clientSystemTime = source._clientSystemTime
  1916. _clientUserTime = source._clientUserTime
  1917. _latency50 = source._latency50
  1918. _latency90 = source._latency90
  1919. _latency95 = source._latency95
  1920. _latency99 = source._latency99
  1921. _latency999 = source._latency999
  1922. _serverCpuUsage = source._serverCpuUsage
  1923. _successfulRequestsPerSecond = source._successfulRequestsPerSecond
  1924. _failedRequestsPerSecond = source._failedRequestsPerSecond
  1925. _clientPollsPerRequest = source._clientPollsPerRequest
  1926. _serverPollsPerRequest = source._serverPollsPerRequest
  1927. _serverQueriesPerCpuSec = source._serverQueriesPerCpuSec
  1928. _clientQueriesPerCpuSec = source._clientQueriesPerCpuSec
  1929. _startTime = source._startTime
  1930. _endTime = source._endTime
  1931. }
  1932. }
  1933. fileprivate mutating func _uniqueStorage() -> _StorageClass {
  1934. if !isKnownUniquelyReferenced(&_storage) {
  1935. _storage = _StorageClass(copying: _storage)
  1936. }
  1937. return _storage
  1938. }
  1939. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1940. _ = _uniqueStorage()
  1941. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1942. while let fieldNumber = try decoder.nextFieldNumber() {
  1943. // The use of inline closures is to circumvent an issue where the compiler
  1944. // allocates stack space for every case branch when no optimizations are
  1945. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1946. switch fieldNumber {
  1947. case 1: try { try decoder.decodeSingularDoubleField(value: &_storage._qps) }()
  1948. case 2: try { try decoder.decodeSingularDoubleField(value: &_storage._qpsPerServerCore) }()
  1949. case 3: try { try decoder.decodeSingularDoubleField(value: &_storage._serverSystemTime) }()
  1950. case 4: try { try decoder.decodeSingularDoubleField(value: &_storage._serverUserTime) }()
  1951. case 5: try { try decoder.decodeSingularDoubleField(value: &_storage._clientSystemTime) }()
  1952. case 6: try { try decoder.decodeSingularDoubleField(value: &_storage._clientUserTime) }()
  1953. case 7: try { try decoder.decodeSingularDoubleField(value: &_storage._latency50) }()
  1954. case 8: try { try decoder.decodeSingularDoubleField(value: &_storage._latency90) }()
  1955. case 9: try { try decoder.decodeSingularDoubleField(value: &_storage._latency95) }()
  1956. case 10: try { try decoder.decodeSingularDoubleField(value: &_storage._latency99) }()
  1957. case 11: try { try decoder.decodeSingularDoubleField(value: &_storage._latency999) }()
  1958. case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._serverCpuUsage) }()
  1959. case 13: try { try decoder.decodeSingularDoubleField(value: &_storage._successfulRequestsPerSecond) }()
  1960. case 14: try { try decoder.decodeSingularDoubleField(value: &_storage._failedRequestsPerSecond) }()
  1961. case 15: try { try decoder.decodeSingularDoubleField(value: &_storage._clientPollsPerRequest) }()
  1962. case 16: try { try decoder.decodeSingularDoubleField(value: &_storage._serverPollsPerRequest) }()
  1963. case 17: try { try decoder.decodeSingularDoubleField(value: &_storage._serverQueriesPerCpuSec) }()
  1964. case 18: try { try decoder.decodeSingularDoubleField(value: &_storage._clientQueriesPerCpuSec) }()
  1965. case 19: try { try decoder.decodeSingularMessageField(value: &_storage._startTime) }()
  1966. case 20: try { try decoder.decodeSingularMessageField(value: &_storage._endTime) }()
  1967. default: break
  1968. }
  1969. }
  1970. }
  1971. }
  1972. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1973. try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
  1974. // The use of inline closures is to circumvent an issue where the compiler
  1975. // allocates stack space for every if/case branch local when no optimizations
  1976. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1977. // https://github.com/apple/swift-protobuf/issues/1182
  1978. if _storage._qps != 0 {
  1979. try visitor.visitSingularDoubleField(value: _storage._qps, fieldNumber: 1)
  1980. }
  1981. if _storage._qpsPerServerCore != 0 {
  1982. try visitor.visitSingularDoubleField(value: _storage._qpsPerServerCore, fieldNumber: 2)
  1983. }
  1984. if _storage._serverSystemTime != 0 {
  1985. try visitor.visitSingularDoubleField(value: _storage._serverSystemTime, fieldNumber: 3)
  1986. }
  1987. if _storage._serverUserTime != 0 {
  1988. try visitor.visitSingularDoubleField(value: _storage._serverUserTime, fieldNumber: 4)
  1989. }
  1990. if _storage._clientSystemTime != 0 {
  1991. try visitor.visitSingularDoubleField(value: _storage._clientSystemTime, fieldNumber: 5)
  1992. }
  1993. if _storage._clientUserTime != 0 {
  1994. try visitor.visitSingularDoubleField(value: _storage._clientUserTime, fieldNumber: 6)
  1995. }
  1996. if _storage._latency50 != 0 {
  1997. try visitor.visitSingularDoubleField(value: _storage._latency50, fieldNumber: 7)
  1998. }
  1999. if _storage._latency90 != 0 {
  2000. try visitor.visitSingularDoubleField(value: _storage._latency90, fieldNumber: 8)
  2001. }
  2002. if _storage._latency95 != 0 {
  2003. try visitor.visitSingularDoubleField(value: _storage._latency95, fieldNumber: 9)
  2004. }
  2005. if _storage._latency99 != 0 {
  2006. try visitor.visitSingularDoubleField(value: _storage._latency99, fieldNumber: 10)
  2007. }
  2008. if _storage._latency999 != 0 {
  2009. try visitor.visitSingularDoubleField(value: _storage._latency999, fieldNumber: 11)
  2010. }
  2011. if _storage._serverCpuUsage != 0 {
  2012. try visitor.visitSingularDoubleField(value: _storage._serverCpuUsage, fieldNumber: 12)
  2013. }
  2014. if _storage._successfulRequestsPerSecond != 0 {
  2015. try visitor.visitSingularDoubleField(value: _storage._successfulRequestsPerSecond, fieldNumber: 13)
  2016. }
  2017. if _storage._failedRequestsPerSecond != 0 {
  2018. try visitor.visitSingularDoubleField(value: _storage._failedRequestsPerSecond, fieldNumber: 14)
  2019. }
  2020. if _storage._clientPollsPerRequest != 0 {
  2021. try visitor.visitSingularDoubleField(value: _storage._clientPollsPerRequest, fieldNumber: 15)
  2022. }
  2023. if _storage._serverPollsPerRequest != 0 {
  2024. try visitor.visitSingularDoubleField(value: _storage._serverPollsPerRequest, fieldNumber: 16)
  2025. }
  2026. if _storage._serverQueriesPerCpuSec != 0 {
  2027. try visitor.visitSingularDoubleField(value: _storage._serverQueriesPerCpuSec, fieldNumber: 17)
  2028. }
  2029. if _storage._clientQueriesPerCpuSec != 0 {
  2030. try visitor.visitSingularDoubleField(value: _storage._clientQueriesPerCpuSec, fieldNumber: 18)
  2031. }
  2032. try { if let v = _storage._startTime {
  2033. try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
  2034. } }()
  2035. try { if let v = _storage._endTime {
  2036. try visitor.visitSingularMessageField(value: v, fieldNumber: 20)
  2037. } }()
  2038. }
  2039. try unknownFields.traverse(visitor: &visitor)
  2040. }
  2041. static func ==(lhs: Grpc_Testing_ScenarioResultSummary, rhs: Grpc_Testing_ScenarioResultSummary) -> Bool {
  2042. if lhs._storage !== rhs._storage {
  2043. let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
  2044. let _storage = _args.0
  2045. let rhs_storage = _args.1
  2046. if _storage._qps != rhs_storage._qps {return false}
  2047. if _storage._qpsPerServerCore != rhs_storage._qpsPerServerCore {return false}
  2048. if _storage._serverSystemTime != rhs_storage._serverSystemTime {return false}
  2049. if _storage._serverUserTime != rhs_storage._serverUserTime {return false}
  2050. if _storage._clientSystemTime != rhs_storage._clientSystemTime {return false}
  2051. if _storage._clientUserTime != rhs_storage._clientUserTime {return false}
  2052. if _storage._latency50 != rhs_storage._latency50 {return false}
  2053. if _storage._latency90 != rhs_storage._latency90 {return false}
  2054. if _storage._latency95 != rhs_storage._latency95 {return false}
  2055. if _storage._latency99 != rhs_storage._latency99 {return false}
  2056. if _storage._latency999 != rhs_storage._latency999 {return false}
  2057. if _storage._serverCpuUsage != rhs_storage._serverCpuUsage {return false}
  2058. if _storage._successfulRequestsPerSecond != rhs_storage._successfulRequestsPerSecond {return false}
  2059. if _storage._failedRequestsPerSecond != rhs_storage._failedRequestsPerSecond {return false}
  2060. if _storage._clientPollsPerRequest != rhs_storage._clientPollsPerRequest {return false}
  2061. if _storage._serverPollsPerRequest != rhs_storage._serverPollsPerRequest {return false}
  2062. if _storage._serverQueriesPerCpuSec != rhs_storage._serverQueriesPerCpuSec {return false}
  2063. if _storage._clientQueriesPerCpuSec != rhs_storage._clientQueriesPerCpuSec {return false}
  2064. if _storage._startTime != rhs_storage._startTime {return false}
  2065. if _storage._endTime != rhs_storage._endTime {return false}
  2066. return true
  2067. }
  2068. if !storagesAreEqual {return false}
  2069. }
  2070. if lhs.unknownFields != rhs.unknownFields {return false}
  2071. return true
  2072. }
  2073. }
  2074. extension Grpc_Testing_ScenarioResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  2075. static let protoMessageName: String = _protobuf_package + ".ScenarioResult"
  2076. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  2077. 1: .same(proto: "scenario"),
  2078. 2: .same(proto: "latencies"),
  2079. 3: .standard(proto: "client_stats"),
  2080. 4: .standard(proto: "server_stats"),
  2081. 5: .standard(proto: "server_cores"),
  2082. 6: .same(proto: "summary"),
  2083. 7: .standard(proto: "client_success"),
  2084. 8: .standard(proto: "server_success"),
  2085. 9: .standard(proto: "request_results"),
  2086. ]
  2087. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  2088. while let fieldNumber = try decoder.nextFieldNumber() {
  2089. // The use of inline closures is to circumvent an issue where the compiler
  2090. // allocates stack space for every case branch when no optimizations are
  2091. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  2092. switch fieldNumber {
  2093. case 1: try { try decoder.decodeSingularMessageField(value: &self._scenario) }()
  2094. case 2: try { try decoder.decodeSingularMessageField(value: &self._latencies) }()
  2095. case 3: try { try decoder.decodeRepeatedMessageField(value: &self.clientStats) }()
  2096. case 4: try { try decoder.decodeRepeatedMessageField(value: &self.serverStats) }()
  2097. case 5: try { try decoder.decodeRepeatedInt32Field(value: &self.serverCores) }()
  2098. case 6: try { try decoder.decodeSingularMessageField(value: &self._summary) }()
  2099. case 7: try { try decoder.decodeRepeatedBoolField(value: &self.clientSuccess) }()
  2100. case 8: try { try decoder.decodeRepeatedBoolField(value: &self.serverSuccess) }()
  2101. case 9: try { try decoder.decodeRepeatedMessageField(value: &self.requestResults) }()
  2102. default: break
  2103. }
  2104. }
  2105. }
  2106. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  2107. // The use of inline closures is to circumvent an issue where the compiler
  2108. // allocates stack space for every if/case branch local when no optimizations
  2109. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  2110. // https://github.com/apple/swift-protobuf/issues/1182
  2111. try { if let v = self._scenario {
  2112. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  2113. } }()
  2114. try { if let v = self._latencies {
  2115. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  2116. } }()
  2117. if !self.clientStats.isEmpty {
  2118. try visitor.visitRepeatedMessageField(value: self.clientStats, fieldNumber: 3)
  2119. }
  2120. if !self.serverStats.isEmpty {
  2121. try visitor.visitRepeatedMessageField(value: self.serverStats, fieldNumber: 4)
  2122. }
  2123. if !self.serverCores.isEmpty {
  2124. try visitor.visitPackedInt32Field(value: self.serverCores, fieldNumber: 5)
  2125. }
  2126. try { if let v = self._summary {
  2127. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  2128. } }()
  2129. if !self.clientSuccess.isEmpty {
  2130. try visitor.visitPackedBoolField(value: self.clientSuccess, fieldNumber: 7)
  2131. }
  2132. if !self.serverSuccess.isEmpty {
  2133. try visitor.visitPackedBoolField(value: self.serverSuccess, fieldNumber: 8)
  2134. }
  2135. if !self.requestResults.isEmpty {
  2136. try visitor.visitRepeatedMessageField(value: self.requestResults, fieldNumber: 9)
  2137. }
  2138. try unknownFields.traverse(visitor: &visitor)
  2139. }
  2140. static func ==(lhs: Grpc_Testing_ScenarioResult, rhs: Grpc_Testing_ScenarioResult) -> Bool {
  2141. if lhs._scenario != rhs._scenario {return false}
  2142. if lhs._latencies != rhs._latencies {return false}
  2143. if lhs.clientStats != rhs.clientStats {return false}
  2144. if lhs.serverStats != rhs.serverStats {return false}
  2145. if lhs.serverCores != rhs.serverCores {return false}
  2146. if lhs._summary != rhs._summary {return false}
  2147. if lhs.clientSuccess != rhs.clientSuccess {return false}
  2148. if lhs.serverSuccess != rhs.serverSuccess {return false}
  2149. if lhs.requestResults != rhs.requestResults {return false}
  2150. if lhs.unknownFields != rhs.unknownFields {return false}
  2151. return true
  2152. }
  2153. }