MCPcopy
hub / github.com/segmentio/kafka-go / BenchmarkMetadataResponse

Function BenchmarkMetadataResponse

protocol/metadata/metadata_test.go:155–199  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

153}
154
155func BenchmarkMetadataResponse(b *testing.B) {
156 prototest.BenchmarkResponse(b, v8, &metadata.Response{
157 ThrottleTimeMs: 123,
158 ClusterID: "test",
159 ControllerID: 1,
160 ClusterAuthorizedOperations: 0x01,
161 Brokers: []metadata.ResponseBroker{
162 {
163 NodeID: 0,
164 Host: "127.0.0.1",
165 Port: 9092,
166 Rack: "rack-1",
167 },
168 {
169 NodeID: 1,
170 Host: "127.0.0.1",
171 Port: 9093,
172 Rack: "rack-2",
173 },
174 },
175 Topics: []metadata.ResponseTopic{
176 {
177 Name: "topic-1",
178 Partitions: []metadata.ResponsePartition{
179 {
180 PartitionIndex: 0,
181 LeaderID: 1,
182 LeaderEpoch: 1234567890,
183 ReplicaNodes: []int32{0},
184 IsrNodes: []int32{0},
185 OfflineReplicas: []int32{1},
186 },
187 {
188 ErrorCode: 1,
189 ReplicaNodes: []int32{},
190 IsrNodes: []int32{},
191 OfflineReplicas: []int32{},
192 },
193 },
194 TopicAuthorizedOperations: 0x01,
195 },
196 },
197 })
198
199}

Callers

nothing calls this directly

Calls 1

BenchmarkResponseFunction · 0.92

Tested by

no test coverage detected