We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想在自定义并发测试的Loop中BindJSON,但是好像没有数据
createResp := api_model.CreateObjRespData{} // 响应体 logs.Infof("Begin benchmark....") Ids = make([]string, C.Number) filter.NewBench(). Concurrent(C.Concurrent).Number(C.Number). Loop(func(c *dataflow.Context) error { c.GET(C.Url + "/api/v1/CreateObj"). SetQuery(NewCreateObjReq()).SetHeader(gout.H{ "x-jwt-token": token, }).BindJSON(&createResp) logs.Infof("createResp %+v", createResp) // 打印位置1 Ids = append(Ids, createResp.Id) return nil }).Do() logs.Infof("Resp----%+v", createResp) // 打印位置2
示例代码如上,我想把请求返回的数据ID记录下来,不管是在位置1还是位置2都是空的,哪怕我在Loop函数里面执行c.Get.Do()也不行。
The text was updated successfully, but these errors were encountered:
@guonaihong
Sorry, something went wrong.
@YRXING ok我看下。
看了下现有实现,目前压测模式只支持编码器(SetXXX系列的函数), 不支持解码器(BindXXX系列函数), 不过这个需求我想想,看怎么实现。
OK,可以顺便也考虑下这个需求:压测的结果如果有选项能输出到文件或者其他格式html,csv,像ghz那样
No branches or pull requests
General Question
我想在自定义并发测试的Loop中BindJSON,但是好像没有数据
示例代码如上,我想把请求返回的数据ID记录下来,不管是在位置1还是位置2都是空的,哪怕我在Loop函数里面执行c.Get.Do()也不行。
The text was updated successfully, but these errors were encountered: