Releases: bojand/ghz
v0.80.0
Changelog
v0.80.0 - 2021-01-02
Changes
Attempt address at least in part #162, #169, #226 and #184.
CLI
Essentially adds several options for controlling behaviour of streaming calls:
--stream-call-duration
Maximum stream call duration. For client streaming and bidi calls, we'll send messages until this duration expires.
For server streaming calls we will receive message until the duration has expired. Note that in server streaming calls the cancellation will result in call cancelled error.
Example: 500ms
.
--stream-call-count
The maximum number of message sends or receives the client will perform in a streaming call before closing the stream and ending the call. For client and bidi streaming calls this dictates the number of messages we will send.
If the data array contains more elements than the count, only data up to the number specified will be used.
If the data array contains fewer elements than the count specified, all the data will be iterated over repeatedly until count limit is reached.
For server streaming calls we will receive message until the specified count is reached. Note that in server streaming calls the cancellation will result in call cancelled error.
Examples:
--stream-call-count=2 -d '[{"name":"Joe"},{"name":"Kate"},{"name":"Sara"}]'
Will cause only [{"name":"Joe"},{"name":"Kate"}]
to be sent. Similarly:
--stream-call-count=5 -d '[{"name":"Joe"},{"name":"Kate"},{"name":"Sara"}]'
Will cause [{"name":"Joe"},{"name":"Kate"},{"name":"Sara"},{"name":"Joe"},{"name":"Kate"}]
to be sent.
--stream-dynamic-messages
In streaming calls, regenerate and apply call template data on every message send operation.
This is helpful in combination with template functionality to generate data for every message sent in a streaming call.
For example:
--stream-dynamic-messages=true --stream-call-count=5 -d '{"name":"{{randomString 8 }}"}'
Will result in streaming call with the following data sent:
[{"name":"sKNdMCIb"},{"name":"KLVXDvn1"},{"name":"RJ3knnBh"},{"name":"FTBqQ7nl"},{"name":"FzeMQIWo"}]
Contrast that with the default dynamic messages setting turned off; which means the template data will be applied only once for each stream call request, but not for each message sent in the streaming call.
--stream-call-count=5 -d '{"name":"{{randomString 8 }}"}'
Results in the following data sent:
[{"name":"5hL64dd0"},{"name":"5hL64dd0"},{"name":"5hL64dd0"},{"name":"5hL64dd0"},{"name":"5hL64dd0"}]
--count-errors
By default stats for fastest, slowest, average, histogram, and latency distributions only take into account the responses with OK status. This option enabled counting of erroneous (non-OK) responses in stats calculations as well.
API
In addition to API to support the above options, there are a few Go package API functions introduced in this pull request that are not exposed via CLI options.
WithDataProvider
can be used to specify a custom data provider function that's invoked with every call.
WithDataProvider(func(*CallData) ([]*dynamic.Message, error) {
protoMessage := &helloworld.HelloRequest{Name: "Bob"}
dynamicMessage, err := dynamic.AsDynamicMessage(protoMessage)
if err != nil {
return nil, err
}
return []*dynamic.Message{dynamicMessage}, nil
}),
The signature is the same for unary or streaming calls. For unary calls the function must return an array with at least 1 value. The first value is always used for unary calls.
Similarly there is a metadata provider function.
WithMetadataProvider(func(*CallData) (*metadata.MD, error) {
return &metadata.MD{"token": []string{mdv}}, nil
}),
WithStreamRecvMsgIntercept
can be used to add an interceptor function to streaming call that is invoked every time we receive a streaming message. Example usage:
WithStreamRecvMsgIntercept(func(msg *dynamic.Message, err error) error {
if err == nil && msg != nil {
reply := &helloworld.HelloReply{}
convertErr := msg.ConvertTo(reply)
if convertErr == nil {
if reply.GetMessage() == "Hello bar" {
return ErrEndStream
}
}
}
return nil
})
In future release we hope to remove reliance on the github.com/jhump/protoreflect/dynamic
package for these APIs.
v0.71.0
Changelog
v0.71.0 - 2020-12-21
Documentation
- af29368 fixing image links in website docs
- ba62cfc fixing website sidebar and image links
- befeb61 fixing paths in concurrency docs
- d3b6cb8 update website workflow
- 3596d25 update website sidebar
Commits
- 18fe406 Merge pull request #253 from howardjohn/grpc/update-134
- d47a4ee Update gRPC dependency
- 15f8ed9 Merge pull request #243 from bojand/dependabot/npm_and_yarn/www/website/highlight.js-9.18.5
- 58e2ece Merge pull request #245 from bojand/dependabot/npm_and_yarn/www/website/bl-1.2.3
- dd68813 Merge pull request #246 from bojand/dependabot/npm_and_yarn/web/ui/dot-prop-4.2.1
- b4113f4 build(deps): bump bl from 1.2.2 to 1.2.3 in /www/website
- e47e656 build(deps): bump dot-prop from 4.2.0 to 4.2.1 in /web/ui
- 2fda958 Refresh certificates
- 2214d1a build(deps): bump highlight.js from 9.18.1 to 9.18.5 in /www/website
- af29368 fixing image links in website docs
- ba62cfc fixing website sidebar and image links
- befeb61 fixing paths in concurrency docs
- d3b6cb8 update website workflow
- 3596d25 update website sidebar
v0.70.0
Changelog
v0.70.0 - 2020-11-21
Changes
qps
option renamed to-r
,--rps
.- Added
--async
option to allow for sending of requests asynchronously. - Added a collection of
--load-*
parameters to control request rate. - Added a similar collection of
--concurrency-*
parameters to control the worker concurrency.
Please see docs for additional info and usage.
Build
- 83e5ecc fixing brew forumla release workflow
Commits
- 83e5ecc fixing brew forumla release workflow
- 37ed69e Merge pull request #235 from bojand/pace
- c115457 add custom pacer and worker ticker configs
- 6c935ef Merge branch 'master' into pace
- 8bcc6ae fixing github release workflow env vars
- 68bdb5f fixing github release workflow env vars
- 5a18ca5 update html template
- fb38e75 add new load and concurrency options to reporter and printer
- a8d9ac7 Merge branch 'master' into pace
- c31b957 cleanup Makefile
- 9baf008 clean up options
- fff27be Merge branch 'master' into pace
- 1fbc366 Merge branch 'master' into pace
- 7be9e72 concurrency docs
- 54efa0a docs and code cleanup
- a61944b more worker ticket tests
- bd4670e add more tests
- 946c6d7 add tools. update golangci-lint. fix linting issues
- b24d883 add concurrency example
- d0ece60 more load docs examples
- a2bed3c fix load docs formatting
- 8eaf49b qps -> rps. add load walktrough. wip
- 05b30b9 logs
- deb669b docs and fixes
- faaec5d help
- a64ff50 step and line
- 7fb2f0d wip on pace
- afa1227 wip on new pace logic
- 9814e0c initial base work for pace and concurrency control
v0.64.0
v0.70.0-beta.1
Changelog
v0.70.0-beta.1 - 2020-11-16
Commits
- 8bcc6ae fixing github release workflow env vars
- 68bdb5f fixing github release workflow env vars
- 5a18ca5 update html template
- fb38e75 add new load and concurrency options to reporter and printer
- a8d9ac7 Merge branch 'master' into pace
- dc6b53f Refresh certificates
- 502b18e update github action workflow and changelog template
- c31b957 cleanup Makefile
- 9baf008 clean up options
- fff27be Merge branch 'master' into pace
- 1fbc366 Merge branch 'master' into pace
- 7be9e72 concurrency docs
- 54efa0a docs and code cleanup
- a61944b more worker ticket tests
- bd4670e add more tests
- 946c6d7 add tools. update golangci-lint. fix linting issues
- b24d883 add concurrency example
- d0ece60 more load docs examples
- a2bed3c fix load docs formatting
- 8eaf49b qps -> rps. add load walktrough. wip
- 05b30b9 logs
- deb669b docs and fixes
- faaec5d help
- a64ff50 step and line
- 7fb2f0d wip on pace
- afa1227 wip on new pace logic
- 9814e0c initial base work for pace and concurrency control
v0.63.0
v0.62.0
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),
)
v0.70.0-beta
Changelog
v0.70.0-beta - 2020-10-21
This is initial work in progress on some significant changes to allow for improved behaviour and better control of load and concurrency within ghz
.
Changes
qps
option renamed to-r
,--rps
.- Added
--async
option to allow for sending of requests asynchronously. - Added a collection of
--load-*
parameters to control request rate. - Added a similar collection of
--concurrency-*
parameters to control the worker concurrency.
Please see options docs and additional load walkthrough and concurrency overview.
Thanks!