{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.3.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package performance\n\n## Constants\n\n```go\nconst (\n\t// Kilo allows us to convert byte units to kB.\n\tKilo = 1024 // TODO Consider adding a unit pkg\n)\n```\n\n## Functions\n\n```go\nfunc CreateChannel(server *BenchmarkServer, channelProfile *genesisconfig.Profile) string\n```\nCreateChannel creates a channel with randomly generated ID of length 10\n\n```go\nfunc Halt(server *BenchmarkServer)\n```\nHalt server\n\n```go\nfunc InitializeServerPool(number int)\n```\nInitializeServerPool instantiates a Benchmark server pool of size 'number'\n\n```go\nfunc MakeNormalTx(channelID string, size int) *cb.Envelope\n```\nMakeNormalTx creates a properly signed transaction that could be used against \\`broadcast\\` API\n\n```go\nfunc OrdererExec(f func(s *BenchmarkServer))\n```\nOrdererExec executes func for each orderer in parallel\n\n```go\nfunc OrdererExecWithArgs(f func(s *BenchmarkServer, i ...interface{}), i ...interface{})\n```\nOrdererExecWithArgs executes func for each orderer in parallel\n\n```go\nfunc RandomID(num int) string\n```\nRandomID generates a random string of num chars\n\n```go\nfunc SeekAllBlocks(c *DeliverClient, channelID string, number uint64) (status cb.Status, err error)\n```\nSeekAllBlocks seeks block from oldest to specified number\n\n```go\nfunc WaitForChannels(server *BenchmarkServer, channelIDs ...interface{})\n```\nWaitForChannels probes a channel till it's ready\n\n```go\nfunc WaitForService(server *BenchmarkServer)\n```\nWaitForService blocks waiting for service to be registered\n\n## Types\n\n```go\ntype BenchmarkServer struct {\n\t// contains filtered or unexported fields\n}\n```\nBenchmarkServer is a pseudo-server that grpc services could be registered to\n\n```go\nfunc GetBenchmarkServer() *BenchmarkServer\n```\nGetBenchmarkServer retrieves next unused server in the pool. This method should ONLY be called by orderer main() and it should be used after initialization\n\n```go\nfunc GetBenchmarkServerPool() []*BenchmarkServer\n```\nGetBenchmarkServerPool returns the whole server pool for client to use This should be used after initialization\n\n```go\nfunc (server *BenchmarkServer) CreateBroadcastClient() *BroadcastClient\n```\nCreateBroadcastClient creates a broadcast client of this server\n\n```go\nfunc (server *BenchmarkServer) CreateDeliverClient() *DeliverClient\n```\nCreateDeliverClient creates a broadcast client of this server\n\n```go\nfunc (server *BenchmarkServer) Halt()\n```\nHalt server\n\n```go\nfunc (server *BenchmarkServer) RegisterService(s ab.AtomicBroadcastServer)\n```\nRegisterService registers a grpc service to server\n\n```go\nfunc (server *BenchmarkServer) Start()\n```\nStart blocks until server being halted. It is to prevent main process to exit\n\n```go\nfunc (server *BenchmarkServer) WaitForService()\n```\nWaitForService blocks waiting for service to be registered\n\n```go\ntype BroadcastClient struct {\n\tgrpc.ServerStream\n\t// contains filtered or unexported fields\n}\n```\nBroadcastClient represents a broadcast client that is used to interact with \\`broadcast\\` API\n\n```go\nfunc (bc *BroadcastClient) Close()\n```\nClose closes a broadcast client\n\n```go\nfunc (BroadcastClient) Context() context.Context\n```\n\n```go\nfunc (bc *BroadcastClient) Errors() \u003c-chan error\n```\nErrors returns the channel which return value of broadcast handler is sent to\n\n```go\nfunc (bc *BroadcastClient) GetResponse() *ab.BroadcastResponse\n```\nGetResponse waits for a response of \\`broadcast\\` API synchronously\n\n```go\nfunc (bc *BroadcastClient) Recv() (*cb.Envelope, error)\n```\nRecv implements AtomicBroadcast\\_BroadcastServer interface\n\n```go\nfunc (bc *BroadcastClient) Send(br *ab.BroadcastResponse) error\n```\nSend implements AtomicBroadcast\\_BroadcastServer interface\n\n```go\nfunc (bc *BroadcastClient) SendRequest(request *cb.Envelope)\n```\nSendRequest sends an envelope to \\`broadcast\\` API synchronously\n\n```go\ntype DeliverClient struct {\n\tgrpc.ServerStream\n\n\tResponseChan chan *ab.DeliverResponse\n\tResultChan   chan error\n\t// contains filtered or unexported fields\n}\n```\nDeliverClient represents a deliver client that is used to interact with \\`deliver\\` API\n\n```go\nfunc (bc *DeliverClient) Close()\n```\nClose closes a deliver client\n\n```go\nfunc (DeliverClient) Context() context.Context\n```\n\n```go\nfunc (bc *DeliverClient) GetResponse() *ab.DeliverResponse\n```\nGetResponse waits for a response of \\`deliver\\` API synchronously\n\n```go\nfunc (bc *DeliverClient) Recv() (*cb.Envelope, error)\n```\nRecv implements AtomicBroadcast\\_BroadcastServer interface\n\n```go\nfunc (bc *DeliverClient) Send(br *ab.DeliverResponse) error\n```\nSend implements AtomicBroadcast\\_BroadcastServer interface\n\n```go\nfunc (bc *DeliverClient) SendRequest(request *cb.Envelope)\n```\nSendRequest sends an envelope to \\`deliver\\` API synchronously\n\n","path":"github.com/eric-erki/https-hyperledger.org/orderer/common/performance","name":"performance","synopsis":"","isRedistributable":true}
