diff --git a/generic/data/data.go b/generic/data/data.go new file mode 100644 index 0000000..9e4a222 --- /dev/null +++ b/generic/data/data.go @@ -0,0 +1,150 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package data + +import ( + "encoding/json" + "strconv" + "strings" + + "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" +) + +var ( + SmallReq, MediumReq, LargeReq *echo.ObjReq + SmallMap, MediumMap, LargeMap map[string]interface{} + SmallString, MediumString, LargeString string + actionSidx, msgSidx, actionMidx, msgMidx, actionLidx, msgLidx int +) + +type Size int + +const ( + Small Size = 6 + Medium Size = 33 + Large Size = 67 +) + +func init() { + // data size: small 1027B, medium 5035B, large 10101B + SmallReq = getReqValue(int(Small)) + MediumReq = getReqValue(int(Medium)) + LargeReq = getReqValue(int(Large)) + SmallString = reqToString(SmallReq) + MediumString = reqToString(MediumReq) + LargeString = reqToString(LargeReq) + actionSidx = strings.Index(SmallString, `"action":""`) + len(`"action":""`) - 1 + actionMidx = strings.Index(MediumString, `"action":""`) + len(`"action":""`) - 1 + actionLidx = strings.Index(LargeString, `"action":""`) + len(`"action":""`) - 1 + msgSidx = strings.Index(SmallString, `"msg":""`) + len(`"msg":""`) - 1 + msgMidx = strings.Index(MediumString, `"msg":""`) + len(`"msg":""`) - 1 + msgLidx = strings.Index(LargeString, `"msg":""`) + len(`"msg":""`) - 1 +} + +func GetJsonString(action, msg string, size Size) string { + switch size { + case Small: + return SmallString[:actionSidx] + action + SmallString[actionSidx:msgSidx] + msg + SmallString[msgSidx:] + case Medium: + return MediumString[:actionMidx] + action + MediumString[actionMidx:msgMidx] + msg + MediumString[msgMidx:] + case Large: + return LargeString[:actionLidx] + action + LargeString[actionLidx:msgLidx] + msg + LargeString[msgLidx:] + } + return "" +} + +func reqToString(req *echo.ObjReq) string { + data, err := json.Marshal(req) + if err != nil { + panic(err) + } + return string(data) +} + +func getReqValue(size int) *echo.ObjReq { + req := &echo.ObjReq{ + Action: "", + Msg: "", + MsgMap: map[string]*echo.SubMessage{}, + SubMsgs: []*echo.SubMessage{}, + MsgSet: []*echo.Message{}, + FlagMsg: &echo.Message{}, + } + + for i := 0; i < size; i++ { + req.MsgMap[strconv.Itoa(i)] = getSubMessage(int64(i)) + req.SubMsgs = append(req.SubMsgs, getSubMessage(int64(i))) + req.MsgSet = append(req.MsgSet, getMessage(int64(i))) + req.FlagMsg = getMessage(int64(i)) + } + + return req +} + +func getSubMessage(i int64) *echo.SubMessage { + value := "hello" + return &echo.SubMessage{ + Id: &i, + Value: &value, + } +} + +func getMessage(i int64) *echo.Message { + value := "hello" + ret := &echo.Message{ + Id: &i, + Value: &value, + SubMessages: []*echo.SubMessage{}, + } + ret.SubMessages = append(ret.SubMessages, getSubMessage(1)) + ret.SubMessages = append(ret.SubMessages, getSubMessage(2)) + return ret +} + +func GetReqMap(size int) map[string]interface{} { + msgMap := make(map[interface{}]interface{}) + subMsgs := make([]interface{}, 0, size) + msgSet := make([]interface{}, 0, size) + flagMsg := make(map[string]interface{}) + for i := 0; i < size; i++ { + msgMap[strconv.Itoa(i)] = getSubMessageMap(int64(i)) + subMsgs = append(subMsgs, getSubMessageMap(int64(i))) + msgSet = append(msgSet, getMessageMap(int64(i))) + flagMsg = getMessageMap(int64(i)) + } + return map[string]interface{}{ + "msgMap": msgMap, + "subMsgs": subMsgs, + "msgSet": msgSet, + "flagMsg": flagMsg, + } +} + +func getSubMessageMap(i int64) map[string]interface{} { + return map[string]interface{}{ + "id": i, + "value": "hello", + } +} + +func getMessageMap(i int64) map[string]interface{} { + return map[string]interface{}{ + "id": i, + "value": "hello", + "subMessages": []interface{}{getSubMessageMap(1), getSubMessageMap(2)}, + } +} diff --git a/generic/http/client/default/kitex_client.go b/generic/http/client/default/kitex_client.go new file mode 100644 index 0000000..b204a2a --- /dev/null +++ b/generic/http/client/default/kitex_client.go @@ -0,0 +1,173 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kclient + +import ( + "bytes" + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudwego/kitex/client" + "github.com/cloudwego/kitex/client/genericclient" + "github.com/cloudwego/kitex/pkg/connpool" + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/transport" + + "github.com/cloudwego/kitex-benchmark/generic/data" + "github.com/cloudwego/kitex-benchmark/runner" +) + +var ( + p generic.DescriptorProvider + g generic.Generic +) + +func init() { + var err error + p, err = generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + // 构造http 请求和返回类型的泛化调用 + g, err = generic.HTTPThriftGeneric(p) + if err != nil { + panic(err) + } +} + +func NewGenericHTTPSmallClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPSmallClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPSmallClient struct { + client genericclient.Client +} + +func (cli *genericHTTPSmallClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.SmallString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func NewGenericHTTPMediumClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPMediumClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPMediumClient struct { + client genericclient.Client +} + +func (cli *genericHTTPMediumClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.MediumString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func NewGenericHTTPLargeClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPLargeClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPLargeClient struct { + client genericclient.Client +} + +func (cli *genericHTTPLargeClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.LargeString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func createCustomRequest(action, msg, data string) (*generic.HTTPRequest, error) { + url := fmt.Sprintf("http://example.com/test/obj/%s", action) + httpRequest, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer([]byte(data))) + if err != nil { + return nil, err + } + httpRequest.Header.Set("msg", msg) + + customReq, err := generic.FromHTTPRequest(httpRequest) + if err != nil { + return nil, err + } + return customReq, nil +} diff --git a/generic/json/client/main.go b/generic/http/client/default/large/main.go similarity index 83% rename from generic/json/client/main.go rename to generic/http/client/default/large/main.go index 795c981..c252975 100644 --- a/generic/json/client/main.go +++ b/generic/http/client/default/large/main.go @@ -17,10 +17,11 @@ package main import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/default" "github.com/cloudwego/kitex-benchmark/runner" ) // main is use for routing. func main() { - runner.Main("GenericJSON", NewGenericJSONClient) + runner.Main("GenericHTTP", kclient.NewGenericHTTPLargeClient) } diff --git a/generic/http/client/default/medium/main.go b/generic/http/client/default/medium/main.go new file mode 100644 index 0000000..45e317d --- /dev/null +++ b/generic/http/client/default/medium/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/default" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericHTTP", kclient.NewGenericHTTPMediumClient) +} diff --git a/generic/http/client/default/small/main.go b/generic/http/client/default/small/main.go new file mode 100644 index 0000000..d877549 --- /dev/null +++ b/generic/http/client/default/small/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/default" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericHTTP", kclient.NewGenericHTTPSmallClient) +} diff --git a/generic/http/client/dynamicgo/kitex_client.go b/generic/http/client/dynamicgo/kitex_client.go new file mode 100644 index 0000000..f1559d0 --- /dev/null +++ b/generic/http/client/dynamicgo/kitex_client.go @@ -0,0 +1,176 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kclient + +import ( + "bytes" + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudwego/kitex/client" + "github.com/cloudwego/kitex/client/genericclient" + "github.com/cloudwego/kitex/pkg/connpool" + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/transport" + + "github.com/cloudwego/kitex-benchmark/generic/data" + "github.com/cloudwego/kitex-benchmark/runner" +) + +var ( + p generic.DescriptorProvider + g generic.Generic +) + +func init() { + var err error + p, err = generic.NewThriftFileProviderWithDynamicGo("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + // 构造http 请求和返回类型的泛化调用 + // enable dynamicgo + var opts []generic.Option + opts = append(opts, generic.UseRawBodyForHTTPResp(true)) + g, err = generic.HTTPThriftGeneric(p, opts...) + if err != nil { + panic(err) + } +} + +func NewGenericHTTPSmallClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPSmallClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPSmallClient struct { + client genericclient.Client +} + +func (cli *genericHTTPSmallClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.SmallString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func NewGenericHTTPMediumClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPMediumClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPMediumClient struct { + client genericclient.Client +} + +func (cli *genericHTTPMediumClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.MediumString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func NewGenericHTTPLargeClient(opt *runner.Options) runner.Client { + var err error + cli := &genericHTTPLargeClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericHTTPLargeClient struct { + client genericclient.Client +} + +func (cli *genericHTTPLargeClient) Echo(action, msg string) error { + customReq, err := createCustomRequest(action, msg, data.LargeString) + if err != nil { + return err + } + + // send the request + reply, err := cli.client.GenericCall(context.Background(), "", customReq) + if reply != nil { + resp := reply.(*generic.HTTPResponse) + runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) + } + return err +} + +func createCustomRequest(action, msg, data string) (*generic.HTTPRequest, error) { + url := fmt.Sprintf("http://example.com/test/obj/%s", action) + httpRequest, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer([]byte(data))) + if err != nil { + return nil, err + } + httpRequest.Header.Set("msg", msg) + + customReq, err := generic.FromHTTPRequest(httpRequest) + if err != nil { + return nil, err + } + return customReq, nil +} diff --git a/generic/http/client/dynamicgo/large/main.go b/generic/http/client/dynamicgo/large/main.go new file mode 100644 index 0000000..d431965 --- /dev/null +++ b/generic/http/client/dynamicgo/large/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericHTTPDynamicGo", kclient.NewGenericHTTPLargeClient) +} diff --git a/generic/http/client/dynamicgo/medium/main.go b/generic/http/client/dynamicgo/medium/main.go new file mode 100644 index 0000000..dec5aa4 --- /dev/null +++ b/generic/http/client/dynamicgo/medium/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericHTTPDynamicGo", kclient.NewGenericHTTPMediumClient) +} diff --git a/generic/http/client/dynamicgo/small/main.go b/generic/http/client/dynamicgo/small/main.go new file mode 100644 index 0000000..9d56607 --- /dev/null +++ b/generic/http/client/dynamicgo/small/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/http/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericHTTPDynamicGo", kclient.NewGenericHTTPSmallClient) +} diff --git a/generic/http/client/kitex_client.go b/generic/http/client/kitex_client.go deleted file mode 100644 index 8cd221f..0000000 --- a/generic/http/client/kitex_client.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2022 CloudWeGo Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package main - -import ( - "bytes" - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudwego/kitex/client" - "github.com/cloudwego/kitex/client/genericclient" - "github.com/cloudwego/kitex/pkg/connpool" - "github.com/cloudwego/kitex/pkg/generic" - "github.com/cloudwego/kitex/pkg/transmeta" - "github.com/cloudwego/kitex/transport" - - "github.com/cloudwego/kitex-benchmark/runner" -) - -var requestData = []byte(` -{ - "msgMap":{ - "v1":{ - "id":123, - "value":"hello" - }, - "v2":{ - "id":321, - "value":"world" - } - }, - "subMsgs":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ], - "msgSet":[ - { - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - }, - { - "id":321, - "value":"world", - "subMessages":[ - { - "id":321, - "value":"world" - }, - { - "id":123, - "value":"hello" - } - ] - } - ], - "flagMsg":{ - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - } -} -`) - -func NewGenericHTTPClient(opt *runner.Options) runner.Client { - p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") - if err != nil { - panic(err) - } - // 构造http 请求和返回类型的泛化调用 - g, err := generic.HTTPThriftGeneric(p) - if err != nil { - panic(err) - } - cli := &genericHTTPClient{} - cli.client, err = genericclient.NewClient("test.echo.kitex", g, - client.WithTransportProtocol(transport.TTHeader), - client.WithHostPorts(opt.Address), - client.WithMetaHandler(transmeta.ClientTTHeaderHandler), - client.WithLongConnection( - connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), - ) - if err != nil { - panic(err) - } - return cli -} - -type genericHTTPClient struct { - client genericclient.Client -} - -func (cli *genericHTTPClient) Echo(action, msg string) error { - ctx := context.Background() - - url := fmt.Sprintf("http://example.com/test/obj/%s", action) - httpRequest, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(requestData)) - if err != nil { - return err - } - httpRequest.Header.Set("msg", msg) - - // send the request - customReq, err := generic.FromHTTPRequest(httpRequest) - if err != nil { - return err - } - - reply, err := cli.client.GenericCall(ctx, "", customReq) - if reply != nil { - resp := reply.(*generic.HTTPResponse) - runner.ProcessResponse(resp.Header.Get("action"), resp.Header.Get("msg")) - } - return err -} diff --git a/generic/json/client/default/kitex_client.go b/generic/json/client/default/kitex_client.go new file mode 100644 index 0000000..f61075e --- /dev/null +++ b/generic/json/client/default/kitex_client.go @@ -0,0 +1,154 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kclient + +import ( + "context" + "encoding/json" + "time" + + "github.com/cloudwego/kitex/client" + "github.com/cloudwego/kitex/client/genericclient" + "github.com/cloudwego/kitex/pkg/connpool" + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/transport" + + "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" + "github.com/cloudwego/kitex-benchmark/generic/data" + "github.com/cloudwego/kitex-benchmark/runner" +) + +var ( + p generic.DescriptorProvider + g generic.Generic +) + +func init() { + var err error + p, err = generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + // 构造json 请求和返回类型的泛化调用 + g, err = generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } +} + +func NewGenericJSONSmallClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONSmallClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONSmallClient struct { + client genericclient.Client +} + +func (cli *genericJSONSmallClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Small)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} + +func NewGenericJSONMediumClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONMediumClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONMediumClient struct { + client genericclient.Client +} + +func (cli *genericJSONMediumClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Medium)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} + +func NewGenericJSONLargeClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONLargeClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONLargeClient struct { + client genericclient.Client +} + +func (cli *genericJSONLargeClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Large)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} diff --git a/generic/json/client/default/large/main.go b/generic/json/client/default/large/main.go new file mode 100644 index 0000000..8aa9627 --- /dev/null +++ b/generic/json/client/default/large/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/default" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSON", kclient.NewGenericJSONLargeClient) +} diff --git a/generic/json/client/default/medium/main.go b/generic/json/client/default/medium/main.go new file mode 100644 index 0000000..f710771 --- /dev/null +++ b/generic/json/client/default/medium/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/default" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSON", kclient.NewGenericJSONMediumClient) +} diff --git a/generic/json/client/default/small/main.go b/generic/json/client/default/small/main.go new file mode 100644 index 0000000..8299842 --- /dev/null +++ b/generic/json/client/default/small/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/default" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSON", kclient.NewGenericJSONSmallClient) +} diff --git a/generic/json/client/dynamicgo/kitex_client.go b/generic/json/client/dynamicgo/kitex_client.go new file mode 100644 index 0000000..be19a21 --- /dev/null +++ b/generic/json/client/dynamicgo/kitex_client.go @@ -0,0 +1,155 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kclient + +import ( + "context" + "encoding/json" + "time" + + "github.com/cloudwego/kitex/client" + "github.com/cloudwego/kitex/client/genericclient" + "github.com/cloudwego/kitex/pkg/connpool" + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/transport" + + "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" + "github.com/cloudwego/kitex-benchmark/generic/data" + "github.com/cloudwego/kitex-benchmark/runner" +) + +var ( + p generic.DescriptorProvider + g generic.Generic +) + +func init() { + var err error + // enable dynamicgo + p, err = generic.NewThriftFileProviderWithDynamicGo("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + // 构造json 请求和返回类型的泛化调用 + g, err = generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } +} + +func NewGenericJSONSmallClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONSmallClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONSmallClient struct { + client genericclient.Client +} + +func (cli *genericJSONSmallClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Small)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} + +func NewGenericJSONMediumClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONMediumClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONMediumClient struct { + client genericclient.Client +} + +func (cli *genericJSONMediumClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Medium)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} + +func NewGenericJSONLargeClient(opt *runner.Options) runner.Client { + var err error + cli := &genericJSONLargeClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + return cli +} + +type genericJSONLargeClient struct { + client genericclient.Client +} + +func (cli *genericJSONLargeClient) Echo(action, msg string) error { + reply, err := cli.client.GenericCall(context.Background(), "TestObj", data.GetJsonString(action, msg, data.Large)) + if reply != nil { + repl := reply.(string) + var rep echo.Request + err = json.Unmarshal([]byte(repl), &rep) + if err != nil { + return err + } + runner.ProcessResponse(rep.Action, rep.Msg) + } + return err +} diff --git a/generic/json/client/dynamicgo/large/main.go b/generic/json/client/dynamicgo/large/main.go new file mode 100644 index 0000000..37c8d8b --- /dev/null +++ b/generic/json/client/dynamicgo/large/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSONDynamicGo", kclient.NewGenericJSONLargeClient) +} diff --git a/generic/json/client/dynamicgo/medium/main.go b/generic/json/client/dynamicgo/medium/main.go new file mode 100644 index 0000000..af09618 --- /dev/null +++ b/generic/json/client/dynamicgo/medium/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSONDynamicGo", kclient.NewGenericJSONMediumClient) +} diff --git a/generic/json/client/dynamicgo/small/main.go b/generic/json/client/dynamicgo/small/main.go new file mode 100644 index 0000000..82ad933 --- /dev/null +++ b/generic/json/client/dynamicgo/small/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/json/client/dynamicgo" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericJSONDynamicGo", kclient.NewGenericJSONSmallClient) +} diff --git a/generic/json/client/kitex_client.go b/generic/json/client/kitex_client.go deleted file mode 100644 index d323679..0000000 --- a/generic/json/client/kitex_client.go +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2022 CloudWeGo Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package main - -import ( - "context" - "encoding/json" - "strings" - "time" - - "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" - "github.com/cloudwego/kitex/client" - "github.com/cloudwego/kitex/client/genericclient" - "github.com/cloudwego/kitex/pkg/connpool" - "github.com/cloudwego/kitex/pkg/generic" - "github.com/cloudwego/kitex/pkg/transmeta" - "github.com/cloudwego/kitex/transport" - - "github.com/cloudwego/kitex-benchmark/runner" -) - -var ( - requestData = ` -{ - "action":"", - "msg":"", - "msgMap":{ - "v1":{ - "id":123, - "value":"hello" - }, - "v2":{ - "id":321, - "value":"world" - } - }, - "subMsgs":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ], - "msgSet":[ - { - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - }, - { - "id":321, - "value":"world", - "subMessages":[ - { - "id":321, - "value":"world" - }, - { - "id":123, - "value":"hello" - } - ] - } - ], - "flagMsg":{ - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - } -} -` - actionidx, msgidx int -) - -func init() { - actionidx = strings.Index(requestData, `"action":""`) + len(`"action":""`) - 1 - msgidx = strings.Index(requestData, `"msg":""`) + len(`"msg":""`) - 1 -} - -func GetJsonString(action, msg string) string { - return requestData[:actionidx] + action + requestData[actionidx:msgidx] + msg + requestData[msgidx:] -} - -func NewGenericJSONClient(opt *runner.Options) runner.Client { - p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") - if err != nil { - panic(err) - } - // 构造json 请求和返回类型的泛化调用 - g, err := generic.JSONThriftGeneric(p) - if err != nil { - panic(err) - } - cli := &genericJSONClient{} - cli.client, err = genericclient.NewClient("test.echo.kitex", g, - client.WithTransportProtocol(transport.TTHeader), - client.WithHostPorts(opt.Address), - client.WithMetaHandler(transmeta.ClientTTHeaderHandler), - client.WithLongConnection( - connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), - ) - if err != nil { - panic(err) - } - return cli -} - -type genericJSONClient struct { - client genericclient.Client -} - -func (cli *genericJSONClient) Echo(action, msg string) error { - ctx := context.Background() - - reply, err := cli.client.GenericCall(ctx, "TestObj", GetJsonString(action, msg)) - if reply != nil { - repl := reply.(string) - var rep echo.Request - err = json.Unmarshal([]byte(repl), &rep) - if err != nil { - return err - } - runner.ProcessResponse(rep.Action, rep.Msg) - } - return err -} diff --git a/generic/json/main.go b/generic/json/main.go deleted file mode 100644 index d5bd131..0000000 --- a/generic/json/main.go +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2022 CloudWeGo Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package main - -import ( - "context" - "encoding/json" - "fmt" - "log" - "net" - "strings" - - "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" - "github.com/cloudwego/kitex-benchmark/perf" - "github.com/cloudwego/kitex-benchmark/runner" - "github.com/cloudwego/kitex/pkg/generic" - "github.com/cloudwego/kitex/pkg/kerrors" - "github.com/cloudwego/kitex/pkg/transmeta" - "github.com/cloudwego/kitex/server" - "github.com/cloudwego/kitex/server/genericserver" -) - -const ( - port = 8002 -) - -var recorder = perf.NewRecorder("GenericJSON@Server") - -var ( - responseData = ` -{ - "action":"", - "msg":"", - "msgMap":{ - "v1":{ - "id":123, - "value":"hello" - }, - "v2":{ - "id":321, - "value":"world" - } - }, - "subMsgs":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ], - "msgSet":[ - { - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - }, - { - "id":321, - "value":"world", - "subMessages":[ - { - "id":321, - "value":"world" - }, - { - "id":123, - "value":"hello" - } - ] - } - ], - "flagMsg":{ - "id":123, - "value":"hello", - "subMessages":[ - { - "id":123, - "value":"hello" - }, - { - "id":321, - "value":"world" - } - ] - } -}` - actionidx, msgidx int -) - -func init() { - actionidx = strings.Index(responseData, `"action":""`) + len(`"action":""`) - 1 - msgidx = strings.Index(responseData, `"msg":""`) + len(`"msg":""`) - 1 -} - -func GetJsonString(action, msg string) string { - return responseData[:actionidx] + action + responseData[actionidx:msgidx] + msg + responseData[msgidx:] -} - -type GenericServerImpl struct{} - -func (s *GenericServerImpl) GenericCall(ctx context.Context, method string, request interface{}) (response interface{}, err error) { - switch method { - case "TestObj": - req := request.(string) - var rep echo.Response - err = json.Unmarshal([]byte(req), &rep) - if err != nil { - return nil, kerrors.NewBizStatusError(500, err.Error()) - } - resp := runner.ProcessRequest(recorder, rep.Action, rep.Msg) - return GetJsonString(resp.Action, resp.Msg), nil - } - return nil, kerrors.NewBizStatusError(404, "not found") -} - -func main() { - // start pprof server - go func() { - perf.ServeMonitor(fmt.Sprintf(":%d", port+10000)) - }() - - // CurDir: ./scripts - p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") - if err != nil { - panic(err) - } - g, err := generic.JSONThriftGeneric(p) - if err != nil { - panic(err) - } - address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", port)} - svr := genericserver.NewServer(new(GenericServerImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) - - err = svr.Run() - if err != nil { - log.Println(err.Error()) - } -} diff --git a/generic/json/server/default/large/main.go b/generic/json/server/default/large/main.go new file mode 100644 index 0000000..66c17ec --- /dev/null +++ b/generic/json/server/default/large/main.go @@ -0,0 +1,55 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DefaultPort+10000)) + }() + + // CurDir: ./scripts + p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DefaultPort)} + svr := genericserver.NewServer(new(kserver.GenericServerLargeImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/default/medium/main.go b/generic/json/server/default/medium/main.go new file mode 100644 index 0000000..36c48d3 --- /dev/null +++ b/generic/json/server/default/medium/main.go @@ -0,0 +1,55 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DefaultPort+10000)) + }() + + // CurDir: ./scripts + p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DefaultPort)} + svr := genericserver.NewServer(new(kserver.GenericServerMediumImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/default/small/main.go b/generic/json/server/default/small/main.go new file mode 100644 index 0000000..99e6028 --- /dev/null +++ b/generic/json/server/default/small/main.go @@ -0,0 +1,55 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DefaultPort+10000)) + }() + + // CurDir: ./scripts + p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DefaultPort)} + svr := genericserver.NewServer(new(kserver.GenericServerSmallImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/dynamicgo/large/main.go b/generic/json/server/dynamicgo/large/main.go new file mode 100644 index 0000000..a111064 --- /dev/null +++ b/generic/json/server/dynamicgo/large/main.go @@ -0,0 +1,56 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DynamicGoPort+10000)) + }() + + // CurDir: ./scripts + // enable dynamicgo + p, err := generic.NewThriftFileProviderWithDynamicGo("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DynamicGoPort)} + svr := genericserver.NewServer(new(kserver.GenericServerLargeImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/dynamicgo/medium/main.go b/generic/json/server/dynamicgo/medium/main.go new file mode 100644 index 0000000..ffacb1d --- /dev/null +++ b/generic/json/server/dynamicgo/medium/main.go @@ -0,0 +1,56 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DynamicGoPort+10000)) + }() + + // CurDir: ./scripts + // enable dynamicgo + p, err := generic.NewThriftFileProviderWithDynamicGo("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DynamicGoPort)} + svr := genericserver.NewServer(new(kserver.GenericServerMediumImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/dynamicgo/small/main.go b/generic/json/server/dynamicgo/small/main.go new file mode 100644 index 0000000..e4053db --- /dev/null +++ b/generic/json/server/dynamicgo/small/main.go @@ -0,0 +1,56 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "fmt" + "log" + "net" + + "github.com/cloudwego/kitex/pkg/generic" + "github.com/cloudwego/kitex/pkg/transmeta" + "github.com/cloudwego/kitex/server" + "github.com/cloudwego/kitex/server/genericserver" + + kserver "github.com/cloudwego/kitex-benchmark/generic/json/server" + "github.com/cloudwego/kitex-benchmark/perf" +) + +func main() { + // start pprof server + go func() { + perf.ServeMonitor(fmt.Sprintf(":%d", kserver.DynamicGoPort+10000)) + }() + + // CurDir: ./scripts + // enable dynamicgo + p, err := generic.NewThriftFileProviderWithDynamicGo("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + g, err := generic.JSONThriftGeneric(p) + if err != nil { + panic(err) + } + address := &net.UnixAddr{Net: "tcp", Name: fmt.Sprintf(":%d", kserver.DynamicGoPort)} + svr := genericserver.NewServer(new(kserver.GenericServerSmallImpl), g, server.WithServiceAddr(address), server.WithMetaHandler(transmeta.ServerTTHeaderHandler)) + + err = svr.Run() + if err != nil { + log.Println(err.Error()) + } +} diff --git a/generic/json/server/server_init.go b/generic/json/server/server_init.go new file mode 100644 index 0000000..c496659 --- /dev/null +++ b/generic/json/server/server_init.go @@ -0,0 +1,86 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server + +import ( + "context" + "encoding/json" + + "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" + "github.com/cloudwego/kitex-benchmark/generic/data" + "github.com/cloudwego/kitex-benchmark/perf" + "github.com/cloudwego/kitex-benchmark/runner" + "github.com/cloudwego/kitex/pkg/kerrors" +) + +const ( + DefaultPort = 8002 + DynamicGoPort = 8003 +) + +var recorder = perf.NewRecorder("GenericJSON@Server") + +type GenericServerSmallImpl struct{} + +func (s *GenericServerSmallImpl) GenericCall(ctx context.Context, method string, request interface{}) (response interface{}, err error) { + switch method { + case "TestObj": + req := request.(string) + var rep echo.Response + err = json.Unmarshal([]byte(req), &rep) + if err != nil { + return nil, kerrors.NewBizStatusError(500, err.Error()) + } + resp := runner.ProcessRequest(recorder, rep.Action, rep.Msg) + return data.GetJsonString(resp.Action, resp.Msg, data.Small), nil + } + return nil, kerrors.NewBizStatusError(404, "not found") +} + +type GenericServerMediumImpl struct{} + +func (s *GenericServerMediumImpl) GenericCall(ctx context.Context, method string, request interface{}) (response interface{}, err error) { + switch method { + case "TestObj": + req := request.(string) + var rep echo.Response + err = json.Unmarshal([]byte(req), &rep) + if err != nil { + return nil, kerrors.NewBizStatusError(500, err.Error()) + } + resp := runner.ProcessRequest(recorder, rep.Action, rep.Msg) + return data.GetJsonString(resp.Action, resp.Msg, data.Medium), nil + } + return nil, kerrors.NewBizStatusError(404, "not found") +} + +type GenericServerLargeImpl struct{} + +func (s *GenericServerLargeImpl) GenericCall(ctx context.Context, method string, request interface{}) (response interface{}, err error) { + switch method { + case "TestObj": + req := request.(string) + var rep echo.Response + err = json.Unmarshal([]byte(req), &rep) + if err != nil { + return nil, kerrors.NewBizStatusError(500, err.Error()) + } + resp := runner.ProcessRequest(recorder, rep.Action, rep.Msg) + return data.GetJsonString(resp.Action, resp.Msg, data.Large), nil + } + return nil, kerrors.NewBizStatusError(404, "not found") +} diff --git a/generic/map/client/kitex_client.go b/generic/map/client/kitex_client.go index 9f67948..6f9c423 100644 --- a/generic/map/client/kitex_client.go +++ b/generic/map/client/kitex_client.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package main +package kclient import ( "context" @@ -28,31 +28,69 @@ import ( "github.com/cloudwego/kitex/pkg/transmeta" "github.com/cloudwego/kitex/transport" + "github.com/cloudwego/kitex-benchmark/generic/data" "github.com/cloudwego/kitex-benchmark/runner" ) -var ( - subMsg1 = map[string]interface{}{ - "id": int64(123), - "value": "hello", +func NewGenericMapSmallClient(opt *runner.Options) runner.Client { + p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) } - subMsg2 = map[string]interface{}{ - "id": int64(321), - "value": "world", + // 构造map 请求和返回类型的泛化调用 + g, err := generic.MapThriftGeneric(p) + if err != nil { + panic(err) } - msg1 = map[string]interface{}{ - "id": int64(123), - "value": "hello", - "subMessages": []interface{}{subMsg1, subMsg2}, + cli := &genericMapClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) } - msg2 = map[string]interface{}{ - "id": int64(321), - "value": "world", - "subMessages": []interface{}{subMsg2, subMsg1}, + cli.reqPool = &sync.Pool{ + New: func() interface{} { + return data.GetReqMap(int(data.Small)) + }, } -) + return cli +} + +func NewGenericMapMediumClient(opt *runner.Options) runner.Client { + p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") + if err != nil { + panic(err) + } + // 构造map 请求和返回类型的泛化调用 + g, err := generic.MapThriftGeneric(p) + if err != nil { + panic(err) + } + cli := &genericMapClient{} + cli.client, err = genericclient.NewClient("test.echo.kitex", g, + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + if err != nil { + panic(err) + } + cli.reqPool = &sync.Pool{ + New: func() interface{} { + return data.GetReqMap(int(data.Medium)) + }, + } + return cli +} -func NewGenericMapClient(opt *runner.Options) runner.Client { +func NewGenericMapLargeClient(opt *runner.Options) runner.Client { p, err := generic.NewThriftFileProvider("./codec/thrift/echo.thrift") if err != nil { panic(err) @@ -75,15 +113,7 @@ func NewGenericMapClient(opt *runner.Options) runner.Client { } cli.reqPool = &sync.Pool{ New: func() interface{} { - return map[string]interface{}{ - "msgMap": map[interface{}]interface{}{ - "v1": subMsg1, - "v2": subMsg2, - }, - "subMsgs": []interface{}{subMsg1, subMsg2}, - "msgSet": []interface{}{msg1, msg2}, - "flagMsg": msg1, - } + return data.GetReqMap(int(data.Large)) }, } return cli diff --git a/generic/ordinary/client/main.go b/generic/map/client/large/main.go similarity index 84% rename from generic/ordinary/client/main.go rename to generic/map/client/large/main.go index 497b623..32b3ecd 100644 --- a/generic/ordinary/client/main.go +++ b/generic/map/client/large/main.go @@ -17,10 +17,11 @@ package main import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/map/client" "github.com/cloudwego/kitex-benchmark/runner" ) // main is use for routing. func main() { - runner.Main("GenericOrdinary", NewGenericOrdinaryClient) + runner.Main("GenericMap", kclient.NewGenericMapLargeClient) } diff --git a/generic/map/client/main.go b/generic/map/client/medium/main.go similarity index 84% rename from generic/map/client/main.go rename to generic/map/client/medium/main.go index e3aed2b..5814d96 100644 --- a/generic/map/client/main.go +++ b/generic/map/client/medium/main.go @@ -17,10 +17,11 @@ package main import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/map/client" "github.com/cloudwego/kitex-benchmark/runner" ) // main is use for routing. func main() { - runner.Main("GenericMap", NewGenericMapClient) + runner.Main("GenericMap", kclient.NewGenericMapMediumClient) } diff --git a/generic/http/client/main.go b/generic/map/client/small/main.go similarity index 84% rename from generic/http/client/main.go rename to generic/map/client/small/main.go index 8e2e002..486231c 100644 --- a/generic/http/client/main.go +++ b/generic/map/client/small/main.go @@ -17,10 +17,11 @@ package main import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/map/client" "github.com/cloudwego/kitex-benchmark/runner" ) // main is use for routing. func main() { - runner.Main("GenericHTTP", NewGenericHTTPClient) + runner.Main("GenericMap", kclient.NewGenericMapSmallClient) } diff --git a/generic/map/main.go b/generic/map/main.go index e0a1c5e..645ff05 100644 --- a/generic/map/main.go +++ b/generic/map/main.go @@ -32,7 +32,7 @@ import ( ) const ( - port = 8003 + port = 8004 ) var recorder = perf.NewRecorder("GenericMap@Server") diff --git a/generic/ordinary/client/kitex_client.go b/generic/ordinary/client/kitex_client.go index a2185e0..b6cf39d 100644 --- a/generic/ordinary/client/kitex_client.go +++ b/generic/ordinary/client/kitex_client.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package main +package kclient import ( "context" @@ -28,31 +28,45 @@ import ( "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo" "github.com/cloudwego/kitex-benchmark/codec/thrift/kitex_gen/echo/echoserver" + "github.com/cloudwego/kitex-benchmark/generic/data" "github.com/cloudwego/kitex-benchmark/runner" ) -var ( - subMsg1 = &echo.SubMessage{ - Id: &(&struct{ x int64 }{int64(123)}).x, - Value: &(&struct{ x string }{"hello"}).x, - } - subMsg2 = &echo.SubMessage{ - Id: &(&struct{ x int64 }{int64(321)}).x, - Value: &(&struct{ x string }{"world"}).x, - } - msg1 = &echo.Message{ - Id: &(&struct{ x int64 }{int64(123)}).x, - Value: &(&struct{ x string }{"hello"}).x, - SubMessages: []*echo.SubMessage{subMsg1, subMsg2}, +func NewGenericOrdinarySmallClient(opt *runner.Options) runner.Client { + cli := &genericOrdinaryClient{} + cli.client = echoserver.MustNewClient("test.echo.kitex", + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + cli.reqPool = &sync.Pool{ + New: func() interface{} { + return data.SmallReq + }, } - msg2 = &echo.Message{ - Id: &(&struct{ x int64 }{int64(321)}).x, - Value: &(&struct{ x string }{"world"}).x, - SubMessages: []*echo.SubMessage{subMsg2, subMsg1}, + return cli +} + +func NewGenericOrdinaryMediumClient(opt *runner.Options) runner.Client { + cli := &genericOrdinaryClient{} + cli.client = echoserver.MustNewClient("test.echo.kitex", + client.WithTransportProtocol(transport.TTHeader), + client.WithHostPorts(opt.Address), + client.WithMetaHandler(transmeta.ClientTTHeaderHandler), + client.WithLongConnection( + connpool.IdleConfig{MaxIdlePerAddress: 1000, MaxIdleGlobal: 1000, MaxIdleTimeout: time.Minute}), + ) + cli.reqPool = &sync.Pool{ + New: func() interface{} { + return data.MediumReq + }, } -) + return cli +} -func NewGenericOrdinaryClient(opt *runner.Options) runner.Client { +func NewGenericOrdinaryLargeClient(opt *runner.Options) runner.Client { cli := &genericOrdinaryClient{} cli.client = echoserver.MustNewClient("test.echo.kitex", client.WithTransportProtocol(transport.TTHeader), @@ -63,15 +77,7 @@ func NewGenericOrdinaryClient(opt *runner.Options) runner.Client { ) cli.reqPool = &sync.Pool{ New: func() interface{} { - return &echo.ObjReq{ - MsgMap: map[string]*echo.SubMessage{ - "v1": subMsg1, - "v2": subMsg2, - }, - SubMsgs: []*echo.SubMessage{subMsg1, subMsg2}, - MsgSet: []*echo.Message{msg1, msg2}, - FlagMsg: msg1, - } + return data.LargeReq }, } return cli diff --git a/generic/ordinary/client/large/main.go b/generic/ordinary/client/large/main.go new file mode 100644 index 0000000..975e4fb --- /dev/null +++ b/generic/ordinary/client/large/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/ordinary/client" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericOrdinary", kclient.NewGenericOrdinaryLargeClient) +} diff --git a/generic/ordinary/client/medium/main.go b/generic/ordinary/client/medium/main.go new file mode 100644 index 0000000..4dee640 --- /dev/null +++ b/generic/ordinary/client/medium/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/ordinary/client" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericOrdinary", kclient.NewGenericOrdinaryMediumClient) +} diff --git a/generic/ordinary/client/small/main.go b/generic/ordinary/client/small/main.go new file mode 100644 index 0000000..5ad3479 --- /dev/null +++ b/generic/ordinary/client/small/main.go @@ -0,0 +1,27 @@ +/* + * Copyright 2022 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + kclient "github.com/cloudwego/kitex-benchmark/generic/ordinary/client" + "github.com/cloudwego/kitex-benchmark/runner" +) + +// main is use for routing. +func main() { + runner.Main("GenericOrdinary", kclient.NewGenericOrdinarySmallClient) +} diff --git a/generic/ordinary/main.go b/generic/ordinary/main.go index de28834..33e1f53 100644 --- a/generic/ordinary/main.go +++ b/generic/ordinary/main.go @@ -32,7 +32,7 @@ import ( ) const ( - port = 8004 + port = 8005 ) var recorder = perf.NewRecorder("GenericOrdinary@Server") diff --git a/go.mod b/go.mod index 15a33de..5b46dd1 100644 --- a/go.mod +++ b/go.mod @@ -5,15 +5,15 @@ go 1.15 require ( github.com/apache/thrift v0.14.0 github.com/cloudfoundry/gosigar v1.3.3 - github.com/cloudwego/fastpb v0.0.2 - github.com/cloudwego/kitex v0.4.3 + github.com/cloudwego/fastpb v0.0.4 + github.com/cloudwego/kitex v0.7.0 github.com/gogo/protobuf v1.3.2 github.com/lesismal/arpc v1.2.4 github.com/lesismal/nbio v1.1.23-0.20210815145206-b106d99bce56 github.com/montanaflynn/stats v0.6.6 github.com/smallnest/rpcx v1.6.11 - google.golang.org/grpc v1.42.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) replace github.com/apache/thrift => github.com/apache/thrift v0.13.0 diff --git a/go.sum b/go.sum index 55a211b..146df42 100644 --- a/go.sum +++ b/go.sum @@ -3,14 +3,22 @@ cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChimeraCoder/gojson v1.1.0/go.mod h1:nYbTQlu6hv8PETM15J927yM0zGj3njIldp72UT1MqSw= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alangpierce/go-forceexport v0.0.0-20160317203124-8f1d6941cd75/go.mod h1:uAXEEpARkRhCZfEvy/y0Jcc888f9tHCc1W7/UeEtreE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -30,15 +38,23 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/brianvoe/gofakeit/v6 v6.16.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7/go.mod h1:2ZlV9BaUH4+NXIBF0aMdKKAnHTzqH+iMU4KUjAbL23Q= github.com/bytedance/gopkg v0.0.0-20220509134931-d1878f638986/go.mod h1:2ZlV9BaUH4+NXIBF0aMdKKAnHTzqH+iMU4KUjAbL23Q= -github.com/bytedance/gopkg v0.0.0-20220531084716-665b4f21126f h1:2YCF3cgO6XCub0HIsLrA8ZGhmAPGZfOeSaGjT6Kx4Mc= github.com/bytedance/gopkg v0.0.0-20220531084716-665b4f21126f/go.mod h1:2ZlV9BaUH4+NXIBF0aMdKKAnHTzqH+iMU4KUjAbL23Q= -github.com/bytedance/mockey v1.0.0-rc.0 h1:vrlH6+FPQQnBh9TEkMinPiN2X1pvxPypKQKAk0mbdX4= -github.com/bytedance/mockey v1.0.0-rc.0/go.mod h1:+Jm/fzWZAuhEDrPXVjDf/jLM2BlLXJkwk94zf2JZ3X4= +github.com/bytedance/gopkg v0.0.0-20230531144706-a12972768317/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= +github.com/bytedance/gopkg v0.0.0-20230728082804-614d0af6619b h1:R6PWoQtxEMpWJPHnpci+9LgFxCS7iJCfOGBvCgZeTKI= +github.com/bytedance/gopkg v0.0.0-20230728082804-614d0af6619b/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= +github.com/bytedance/mockey v1.2.0 h1:847+X2fBSM4s/AIN4loO5d16PCgEj53j7Q8YVB+8P6c= +github.com/bytedance/mockey v1.2.0/go.mod h1:+Jm/fzWZAuhEDrPXVjDf/jLM2BlLXJkwk94zf2JZ3X4= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.8.8/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -50,11 +66,18 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chenzhuoyu/iasm v0.0.0-20220818063314-28c361dae733 h1:Hx6Jxqln+bHRrtjUdgrehhF3gtWVJ2S7bjO/YTNn8Fg= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/iasm v0.0.0-20220818063314-28c361dae733/go.mod h1:wOQ0nsbeOLa2awv8bUYFW/EHXbjQMlZ10fAlXDB2sz8= +github.com/chenzhuoyu/iasm v0.0.0-20230222070914-0b1b64b0e762/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/choleraehyq/pid v0.0.13/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U= -github.com/choleraehyq/pid v0.0.15 h1:PejhUZowqxxssjwyaw4OZURRFjnvftZfeEWK9UoWPXU= github.com/choleraehyq/pid v0.0.15/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U= +github.com/choleraehyq/pid v0.0.16/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U= +github.com/choleraehyq/pid v0.0.17 h1:BLBfHTllp2nRRbZ/cOFHKlx9oWJuMwKmp7GqB5d58Hk= +github.com/choleraehyq/pid v0.0.17/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -63,29 +86,47 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudfoundry/gosigar v1.3.3 h1:aR9qIZ/Njb4GYPUGnoJMfXdhz+AOy80r4r3LUQC5A0g= github.com/cloudfoundry/gosigar v1.3.3/go.mod h1:4TGthjsfIxe6Svlzn48EUw9xTTjT/2NnWyeRrferFP0= -github.com/cloudwego/fastpb v0.0.2 h1:qgz6Qxz1DRQ95Der6nr6vsdgXV58rvuK1J2VNzwlzg4= -github.com/cloudwego/fastpb v0.0.2/go.mod h1:/V13XFTq2TUkxj2qWReV8MwfPC4NnPcy6FsrojnsSG0= -github.com/cloudwego/frugal v0.1.3 h1:tw3+hh4YMmtHFHRue3OGYjAnkxnZRHqeAyG18+7z5aI= +github.com/cloudwego/configmanager v0.2.0 h1:niVpVg+wQ+npNqnH3dup96SMbR02Pk+tNErubYCJqKo= +github.com/cloudwego/configmanager v0.2.0/go.mod h1:FLIQTjxsZRGjnmDhTttWQTy6f6DghPTatfBVOs2gQLk= +github.com/cloudwego/dynamicgo v0.1.0/go.mod h1:Mdsz0XGsIImi15vxhZaHZpspNChEmBMIiWkUfD6JDKg= +github.com/cloudwego/dynamicgo v0.1.2 h1:t5KMzo/UkT002n3EvGI0Y6+Me73NGDzFI/AQlT1LQME= +github.com/cloudwego/dynamicgo v0.1.2/go.mod h1:AdPqyFN+0+fc3iVSSWojDCnOGPkzH+T0rI65017GCUA= +github.com/cloudwego/fastpb v0.0.3/go.mod h1:/V13XFTq2TUkxj2qWReV8MwfPC4NnPcy6FsrojnsSG0= +github.com/cloudwego/fastpb v0.0.4 h1:/ROVVfoFtpfc+1pkQLzGs+azjxUbSOsAqSY4tAAx4mg= +github.com/cloudwego/fastpb v0.0.4/go.mod h1:/V13XFTq2TUkxj2qWReV8MwfPC4NnPcy6FsrojnsSG0= github.com/cloudwego/frugal v0.1.3/go.mod h1:b981ViPYdhI56aFYsoMjl9kv6yeqYSO+iEz2jrhkCgI= +github.com/cloudwego/frugal v0.1.6/go.mod h1:9ElktKsh5qd2zDBQ5ENhPSQV7F2dZ/mXlr1eaZGDBFs= +github.com/cloudwego/frugal v0.1.7 h1:Ggyk8mk0WrhBlM4g4RJxdOcVWJl/Hxbd8NJ19J8My6c= +github.com/cloudwego/frugal v0.1.7/go.mod h1:3VECBCSiTYwm3QApqHXjZB9NDH+8hUw7txxlr+6pPb4= github.com/cloudwego/kitex v0.3.2/go.mod h1:/XD07VpUD9VQWmmoepASgZ6iw//vgWikVA9MpzLC5i0= -github.com/cloudwego/kitex v0.4.3 h1:NnDVwzHA6ke6CN5O0JxAYxiGx7U4IvUIE6KMnIM0R18= -github.com/cloudwego/kitex v0.4.3/go.mod h1:7CV4Cs5oi7dWqI3fFoDTLJHyt/18z7nlHIIHsQQNnbE= +github.com/cloudwego/kitex v0.4.4/go.mod h1:3FcH5h9Qw+dhRljSzuGSpWuThttA8DvK0BsL7HUYydo= +github.com/cloudwego/kitex v0.6.1/go.mod h1:zI1GBrjT0qloTikcCfQTgxg3Ws+yQMyaChEEOcGNUvA= +github.com/cloudwego/kitex v0.7.0 h1:v58nahUC5f0ETbIHVshgZbekMxw5gAyC6Pm5xzI4xmY= +github.com/cloudwego/kitex v0.7.0/go.mod h1:RVWi+MbiPzI0Gi7fz8KZp+zsxB1/pLJZkr4kEwAuX6k= +github.com/cloudwego/localsession v0.0.2 h1:N9/IDtCPj1fCL9bCTP+DbXx3f40YjVYWcwkJG0YhQkY= +github.com/cloudwego/localsession v0.0.2/go.mod h1:kiJxmvAcy4PLgKtEnPS5AXed3xCiXcs7Z+KBHP72Wv8= github.com/cloudwego/netpoll v0.2.4/go.mod h1:1T2WVuQ+MQw6h6DpE45MohSvDTKdy2DlzCx2KsnPI4E= -github.com/cloudwego/netpoll v0.2.6 h1:vzN8cyayoa9RdCOG87tqkYO/j2hA4SMLC+vkcNUq6uI= -github.com/cloudwego/netpoll v0.2.6/go.mod h1:1T2WVuQ+MQw6h6DpE45MohSvDTKdy2DlzCx2KsnPI4E= +github.com/cloudwego/netpoll v0.3.1/go.mod h1:1T2WVuQ+MQw6h6DpE45MohSvDTKdy2DlzCx2KsnPI4E= +github.com/cloudwego/netpoll v0.4.0/go.mod h1:xVefXptcyheopwNDZjDPcfU6kIjZXZ4nY550k1yH9eQ= +github.com/cloudwego/netpoll v0.4.1 h1:/pGsY7Rs09KqEXEniB9fcsEWfi1iY+66bKUO3/NO6hc= +github.com/cloudwego/netpoll v0.4.1/go.mod h1:xVefXptcyheopwNDZjDPcfU6kIjZXZ4nY550k1yH9eQ= github.com/cloudwego/thriftgo v0.1.2/go.mod h1:LzeafuLSiHA9JTiWC8TIMIq64iadeObgRUhmVG1OC/w= -github.com/cloudwego/thriftgo v0.2.1 h1:pKEZDDND14+kG4ILPCq0sqv3gidjxOnf/wLjOwxzBks= -github.com/cloudwego/thriftgo v0.2.1/go.mod h1:8i9AF5uDdWHGqzUhXDlubCjx4MEfKvWXGQlMWyR0tM4= +github.com/cloudwego/thriftgo v0.2.4/go.mod h1:8i9AF5uDdWHGqzUhXDlubCjx4MEfKvWXGQlMWyR0tM4= +github.com/cloudwego/thriftgo v0.2.7/go.mod h1:8i9AF5uDdWHGqzUhXDlubCjx4MEfKvWXGQlMWyR0tM4= +github.com/cloudwego/thriftgo v0.2.11/go.mod h1:dAyXHEmKXo0LfMCrblVEY3mUZsdeuA5+i0vF5f09j7E= +github.com/cloudwego/thriftgo v0.3.0 h1:BBb9hVcqmu9p4iKUP/PSIaDB21Vfutgd7k2zgK37Q9Q= +github.com/cloudwego/thriftgo v0.3.0/go.mod h1:AvH0iEjvKHu3cdxG7JvhSAaffkS4h2f4/ZxpJbm48W4= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-jump v0.0.0-20170409065014-e1f439676b57 h1:qZNIK8jjHgLFHAW2wzCWPEv0ZIgcBhU7X3oDt/p3Sv0= github.com/dgryski/go-jump v0.0.0-20170409065014-e1f439676b57/go.mod h1:4hKCXuwrJoYvHZxJ86+bRVTOMyJ0Ej+RqfSm8mHi6KA= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= @@ -97,7 +138,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= @@ -105,7 +146,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= @@ -113,10 +158,20 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663 h1:jI2GiiRh+pPbey52EVmbU6kuLiXqwy4CXZ4gwUBj8Y0= github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI= github.com/go-redis/redis/v8 v8.8.2 h1:O/NcHqobw7SEptA0yA6up6spZVFtwE06SXM8rgLtsP8= @@ -128,6 +183,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -163,8 +219,10 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -225,6 +283,8 @@ github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= @@ -243,6 +303,8 @@ github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSg github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kavu/go_reuseport v1.5.0 h1:UNuiY2OblcqAtVDE8Gsg1kZz8zbBWg907sP1ceBV+bk= github.com/kavu/go_reuseport v1.5.0/go.mod h1:CG8Ee7ceMFSMnx/xr25Vm0qXaj2Z4i5PWoUx+JZ5/CU= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -250,8 +312,9 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.2/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/reedsolomon v1.9.10 h1:2NxF+NPJkRyCgXuAd2ZOf4mj3lb3pcma9aLyE2Db0B8= github.com/klauspost/reedsolomon v1.9.10/go.mod h1:nLvuzNvy1ZDNQW30IuMc2ZWCbiqrJgdLoUS2X8HAUVg= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= @@ -312,6 +375,8 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/gls v0.0.0-20220109145502-612d0167dce5 h1:uiS4zKYKJVj5F3ID+5iylfKPsEQmBEOucSD9Vgmn0i0= +github.com/modern-go/gls v0.0.0-20220109145502-612d0167dce5/go.mod h1:I8AX+yW//L8Hshx6+a1m3bYkwXkpsVjA2795vP4f4oQ= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= @@ -353,6 +418,9 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/peterbourgon/g2s v0.0.0-20140925154142-ec76db4c1ac1 h1:5Dl+ADmsGerAqHwWzyLqkNaUBQ+48DQwfDCaW1gHAQM= github.com/peterbourgon/g2s v0.0.0-20140925154142-ec76db4c1ac1/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -376,6 +444,7 @@ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -386,6 +455,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 h1:AJNDS0kP60X8wwWFvbLPwDuojxubj9pbfK7pjHw0vKg= github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -433,20 +504,27 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7SJEOqkIdNDGJXrQIhuIx9D2DBXjavSU= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= +github.com/thrift-iterator/go v0.0.0-20190402154806-9b5a67519118/go.mod h1:60PRwE/TCI1UqLvn8v2pwAf6+yzTPLP/Ji5xaesWDqk= github.com/tidwall/gjson v1.9.3 h1:hqzS9wAHMO+KVBBkLxYdkEeeFHuqr95GfClRLKlgK0E= github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -456,6 +534,11 @@ github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tjfoc/gmsm v1.4.0 h1:8nbaiZG+iVdh+fXVw0DZoZZa7a4TGm3Qab+xdrdzj8s= github.com/tjfoc/gmsm v1.4.0/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/v2pro/plz v0.0.0-20221028024117-e5f9aec5b631/go.mod h1:3gacX+hQo+xvl0vtLqCMufzxuNCwt4geAVOMt2LQYfE= +github.com/v2pro/quokka v0.0.0-20171201153428-382cb39c6ee6/go.mod h1:0VP5W9AFNVWU8C1QLNeVg8TvzoEkIHWZ4vxtxEVFWUY= +github.com/v2pro/wombat v0.0.0-20180402055224-a56dbdcddef2/go.mod h1:wen8nMxrRrUmXnRwH+3wGAW+hyYTHcOrTNhMpxyp/i0= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fastrand v0.0.0-20170531153657-19dd0f0bf014 h1:wMIk7zCJy828JUr6OlYwXO11ijcXtEPDxoCaktP5p8w= @@ -474,6 +557,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -488,8 +573,10 @@ go.opentelemetry.io/otel/trace v0.19.0/go.mod h1:4IXiNextNOpPnRlI4ryK69mn5iC84bj go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= -golang.org/x/arch v0.0.0-20220722155209-00200b7164a7 h1:VBQqJMNMRfQsWSiCTLgz9XjAfWlgnJAPv8nsp1HF8Tw= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.0.0-20220722155209-00200b7164a7/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.2.0 h1:W1sUEHXiJTfjaFJ5SLo0N6lZn+0eO5gWD1MFeTGqQEY= +golang.org/x/arch v0.2.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -503,20 +590,43 @@ golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210513122933-cd7d49e622d5 h1:N6Jp/LCiEoIBX56BZSR2bepK5GtbSC2DDOYT742mMfE= golang.org/x/crypto v0.0.0-20210513122933-cd7d49e622d5/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20171107184841-a337091b0525/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -548,8 +658,11 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -564,8 +677,9 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -575,6 +689,7 @@ golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -596,19 +711,26 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210818153620-00dd8d7831e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2 h1:fqTvyMIIj+HRzMmnzr9NtpHP6uVpvB5fkHcgPDC4nu8= golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.1.1-0.20171102192421-88f656faf3f3/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -616,21 +738,26 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -640,13 +767,23 @@ golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -678,8 +815,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/examples v0.0.0-20210823233914-c361e9ea1646 h1:vAXL8rNp+sSd8lQDeXcGmsnSTRl24oUWTNpDXljpj5k= google.golang.org/grpc/examples v0.0.0-20210823233914-c361e9ea1646/go.mod h1:bF8wuZSAZTcbF7ZPKrDI/qY52toTP/yxLpRRY4Eu9Js= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -695,8 +832,10 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -706,6 +845,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -728,6 +868,7 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/scripts/benchmark_generic.sh b/scripts/benchmark_generic.sh index 5285a76..ed7e383 100755 --- a/scripts/benchmark_generic.sh +++ b/scripts/benchmark_generic.sh @@ -6,39 +6,52 @@ echo "Checking whether the environment meets the requirements ..." source $CURDIR/env.sh echo "Check finished." -srepo=("generic_http" "generic_json" "generic_map" "generic_ordinary") -crepo=("generic_http" "generic_json" "generic_map" "generic_ordinary") -ports=(8001 8002 8003 8004) +srepo=("generic_http" "generic_http" "generic_json" "generic_json_dynamicgo" "generic_map" "generic_ordinary") +crepo=("generic_http" "generic_http_dynamicgo" "generic_json" "generic_json_dynamicgo" "generic_map" "generic_ordinary") +ports=(8001 8001 8002 8003 8004 8005) +data=("1KB" "5KB" "10KB") + +function finish_cmd_generic() { + # to csv report + ./scripts/reports/to_csv.sh output/"$1.log" > output/"$1".csv + echo "output reports: output/$1.log, output/$1.csv" + cat ./output/"$1.csv" +} echo "Building generic services by exec build_generic.sh ..." source $CURDIR/build_generic.sh echo "Build finished." # benchmark -for b in ${body[@]}; do - for c in ${concurrent[@]}; do - for ((i = 0; i < ${#srepo[@]}; i++)); do - srp=${srepo[i]} - crp=${crepo[i]} - addr="127.0.0.1:${ports[i]}" - # server start - echo "Starting server [$srp], if failed please check [output/log/nohup.log] for detail" - nohup $cmd_server $output_dir/bin/${srp}_reciever >> $output_dir/log/nohup.log 2>&1 & - sleep 1 - echo "Server [$srp] running with [$cmd_server]" +for d in ${data[@]}; do + report="$(date +%F-%H-%M)_${d}" + tee_cmd_generic="tee -a output/$report.log" + echo "------------------------------" + echo "Data size: $d" + for b in ${body[@]}; do + for c in ${concurrent[@]}; do + for ((i = 0; i < ${#srepo[@]}; i++)); do + srp=${srepo[i]} + crp=${crepo[i]} + addr="127.0.0.1:${ports[i]}" + # server start + echo "Starting server [$srp], if failed please check [output/log/nohup.log] for detail" + nohup $cmd_server $output_dir/bin/${srp}_${d}_reciever >> $output_dir/log/nohup.log 2>&1 & + sleep 1 + echo "Server [$srp] running with [$cmd_server]" - # run client - echo "Client [$crp] running with [$cmd_client]" - $cmd_client $output_dir/bin/${crp}_bencher -addr="$addr" -b=$b -c=$c -n=$n --sleep=$sleep | $tee_cmd + # run client + echo "Client [$crp] running with [$cmd_client]" + $cmd_client $output_dir/bin/${crp}_${d}_bencher -addr="$addr" -b=$b -c=$c -n=$n --sleep=$sleep | $tee_cmd_generic - # stop server - pid=$(ps -ef | grep ${srp}_reciever | grep -v grep | awk '{print $2}') - disown $pid - kill -9 $pid - echo "Server [$srp] stopped, pid [$pid]." - sleep 1 + # stop server + pid=$(ps -ef | grep ${srp}_${d}_reciever | grep -v grep | awk '{print $2}') + disown $pid + kill -9 $pid + echo "Server [$srp] stopped, pid [$pid]." + sleep 1 + done done done + finish_cmd_generic $report done - -finish_cmd diff --git a/scripts/build_generic.sh b/scripts/build_generic.sh index 51ae530..98bccdb 100644 --- a/scripts/build_generic.sh +++ b/scripts/build_generic.sh @@ -15,13 +15,38 @@ $GOEXEC mod edit -replace=github.com/apache/thrift=github.com/apache/thrift@v0.1 $GOEXEC mod tidy # build clients -$GOEXEC build -v -o $output_dir/bin/generic_http_bencher $generic_dir/http/client -$GOEXEC build -v -o $output_dir/bin/generic_map_bencher $generic_dir/map/client -$GOEXEC build -v -o $output_dir/bin/generic_json_bencher $generic_dir/json/client -$GOEXEC build -v -o $output_dir/bin/generic_ordinary_bencher $generic_dir/ordinary/client +$GOEXEC build -v -o $output_dir/bin/generic_http_1KB_bencher $generic_dir/http/client/default/small +$GOEXEC build -v -o $output_dir/bin/generic_http_5KB_bencher $generic_dir/http/client/default/medium +$GOEXEC build -v -o $output_dir/bin/generic_http_10KB_bencher $generic_dir/http/client/default/large +$GOEXEC build -v -o $output_dir/bin/generic_http_dynamicgo_1KB_bencher $generic_dir/http/client/dynamicgo/small +$GOEXEC build -v -o $output_dir/bin/generic_http_dynamicgo_5KB_bencher $generic_dir/http/client/dynamicgo/medium +$GOEXEC build -v -o $output_dir/bin/generic_http_dynamicgo_10KB_bencher $generic_dir/http/client/dynamicgo/large +$GOEXEC build -v -o $output_dir/bin/generic_map_1KB_bencher $generic_dir/map/client/small +$GOEXEC build -v -o $output_dir/bin/generic_map_5KB_bencher $generic_dir/map/client/medium +$GOEXEC build -v -o $output_dir/bin/generic_map_10KB_bencher $generic_dir/map/client/large +$GOEXEC build -v -o $output_dir/bin/generic_json_1KB_bencher $generic_dir/json/client/default/small +$GOEXEC build -v -o $output_dir/bin/generic_json_5KB_bencher $generic_dir/json/client/default/medium +$GOEXEC build -v -o $output_dir/bin/generic_json_10KB_bencher $generic_dir/json/client/default/large +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_1KB_bencher $generic_dir/json/client/dynamicgo/small +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_5KB_bencher $generic_dir/json/client/dynamicgo/medium +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_10KB_bencher $generic_dir/json/client/dynamicgo/large +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_1KB_bencher $generic_dir/ordinary/client/small +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_5KB_bencher $generic_dir/ordinary/client/medium +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_10KB_bencher $generic_dir/ordinary/client/large # build servers -$GOEXEC build -v -o $output_dir/bin/generic_http_reciever $generic_dir/http -$GOEXEC build -v -o $output_dir/bin/generic_map_reciever $generic_dir/map -$GOEXEC build -v -o $output_dir/bin/generic_json_reciever $generic_dir/json -$GOEXEC build -v -o $output_dir/bin/generic_ordinary_reciever $generic_dir/ordinary \ No newline at end of file +$GOEXEC build -v -o $output_dir/bin/generic_http_1KB_reciever $generic_dir/http +$GOEXEC build -v -o $output_dir/bin/generic_http_5KB_reciever $generic_dir/http +$GOEXEC build -v -o $output_dir/bin/generic_http_10KB_reciever $generic_dir/http +$GOEXEC build -v -o $output_dir/bin/generic_map_1KB_reciever $generic_dir/map +$GOEXEC build -v -o $output_dir/bin/generic_map_5KB_reciever $generic_dir/map +$GOEXEC build -v -o $output_dir/bin/generic_map_10KB_reciever $generic_dir/map +$GOEXEC build -v -o $output_dir/bin/generic_json_1KB_reciever $generic_dir/json/server/default/small +$GOEXEC build -v -o $output_dir/bin/generic_json_5KB_reciever $generic_dir/json/server/default/medium +$GOEXEC build -v -o $output_dir/bin/generic_json_10KB_reciever $generic_dir/json/server/default/large +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_1KB_reciever $generic_dir/json/server/dynamicgo/small +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_5KB_reciever $generic_dir/json/server/dynamicgo/medium +$GOEXEC build -v -o $output_dir/bin/generic_json_dynamicgo_10KB_reciever $generic_dir/json/server/dynamicgo/large +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_1KB_reciever $generic_dir/ordinary +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_5KB_reciever $generic_dir/ordinary +$GOEXEC build -v -o $output_dir/bin/generic_ordinary_10KB_reciever $generic_dir/ordinary \ No newline at end of file diff --git a/scripts/reports/to_csv.sh b/scripts/reports/to_csv.sh index 92edd60..a0a3973 100755 --- a/scripts/reports/to_csv.sh +++ b/scripts/reports/to_csv.sh @@ -2,4 +2,4 @@ # csv # usage: to_csv.sh xxx.log -grep TPS "$1" | awk -F '[ :,]+' '{split($6,a,"m");split($8,b,"m");print $2","substr($11,3)","substr($9,4)","$4","a[1]","b[1]}' +grep TPS "$1" | awk -F '[ :,]+' '{split($6,a,"m");split($8,b,"m");print $2","substr($11,3)","substr($9,4)","$4","a[1]","b[1]}' \ No newline at end of file