github bojand/ghz v0.62.0

latest releases: v0.120.0, v0.119.0, v0.118.0...
4 years ago

Changelog

v0.62.0 - 2020-10-25

  • [feature] [option] adding a func as a option to randomize each request #236

Example

func dataFunc(mtd *desc.MethodDescriptor, cd *runner.CallData) []byte {
	msg := &helloworld.HelloRequest{}
	msg.Name = cd.WorkerID
	binData, err := proto.Marshal(msg)
	return binData
}

report, err := runner.Run(
	"helloworld.Greeter.SayHello",
	"0.0.0.0:50051",
	runner.WithProtoFile("./testdata/greeter.proto", []string{}),
	runner.WithInsecure(true),
	runner.WithBinaryDataFunc(dataFunc),
)

Don't miss a new ghz release

NewReleases is sending notifications on new releases.