diff --git a/app/cmd/benchmark.go b/app/cmd/benchmark.go new file mode 100644 index 000000000..73d3ede40 --- /dev/null +++ b/app/cmd/benchmark.go @@ -0,0 +1,81 @@ +package cmd + +import ( + "fmt" + replicaClient "github.com/longhorn/longhorn-engine/pkg/replica/client" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +func BenchmarkCmd() cli.Command { + return cli.Command{ + Name: "bench", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "instance-type", + Usage: "Longhorn instance type, engine or replica", + }, + cli.StringFlag{ + Name: "bench-type,b", + Usage: "The type can be /-//-/. For example, seq-bandwidth-write.", + }, + cli.IntFlag{ + Name: "thread,t", + Value: 1, + Usage: "The concurrent thread count. For latency related benchmarks, this value will be forcibly set to 1.", + }, + cli.Int64Flag{ + Name: "size", + Value: 1 << 30, + Usage: "The test size. " + + "If there are multi-thread enabled, this cmd will evenly split the test size for each thread. And each thread should have at least one block handled." + + "For bandwidth benchmarks, the block size is 1MB. Other benchmarks use 4K-block instead.", + }, + }, + Usage: "Benchmark engine or replica IO performance. When benchmarking engine with this cmd, the frontend iSCSI will be bypassed. When benchmarking replica, both the frontend iSCSI and the engine-replica connection will be bypassed.", + Action: func(c *cli.Context) { + if err := bench(c); err != nil { + logrus.WithError(err).Fatalf("Error running iops command") + } + }, + } +} + +func bench(c *cli.Context) error { + instanceType := c.String("instance-type") + benchType := c.String("bench-type") + threadCnt := c.Int("thread") + size := c.Int64("size") + + var output string + + switch instanceType { + case "engine": + controllerClient, err := getControllerClient(c) + if err != nil { + return err + } + defer controllerClient.Close() + output, err = controllerClient.VolumeBench(benchType, threadCnt, size) + if err != nil { + return err + } + case "replica": + url := c.GlobalString("url") + volumeName := c.GlobalString("volume-name") + repClient, err := replicaClient.NewReplicaClient(url, volumeName, "") + if err != nil { + return err + } + defer repClient.Close() + output, err = repClient.Bench(benchType, threadCnt, size) + if err != nil { + return err + } + default: + return fmt.Errorf("invalid bench type %s", benchType) + } + + fmt.Println(output) + return nil +} diff --git a/go.mod b/go.mod index 960ecefe1..f0237a967 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/longhorn/longhorn-engine go 1.22.2 +replace github.com/longhorn/types => github.com/shuo-wu/types v0.0.0-20240429183325-93bff58b40b8 + require ( github.com/docker/go-units v0.5.0 github.com/gofrs/flock v0.8.1 diff --git a/go.sum b/go.sum index 2153d7f7d..9f64c4d2a 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,6 @@ github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 h1:SjZ2GvvOononHOpK github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8/go.mod h1:uEyr4WpAH4hio6LFriaPkL938XnrvLpNPmQHBdrmbIE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -33,8 +31,6 @@ github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0 github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -70,42 +66,14 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/longhorn/backupstore v0.0.0-20240417071544-3bd377eeefeb h1:GkAG0P7QI32PYgjLBV6VvaEAM/Z9dKyPohccU1js+Uk= -github.com/longhorn/backupstore v0.0.0-20240417071544-3bd377eeefeb/go.mod h1:4cbJWtlrD2cGTQxQLtdlPTYopiJiusXH7CpOBrn/s3k= -github.com/longhorn/backupstore v0.0.0-20240426093637-ac3867f121c0 h1:sb9HK8uWApqrBbpjnxlNSmIB5f4oi3UqfeRHVniPcqo= -github.com/longhorn/backupstore v0.0.0-20240426093637-ac3867f121c0/go.mod h1:NlOHCyQiGjn9TS1HUfQlBESttDPzi9x1Vs38geRV9SU= github.com/longhorn/backupstore v0.0.0-20240427164602-c8721e8ea31a h1:cwHDzWi0zkgg/SHtvEhWIYLvZHJvCp5twS8qBOUt/Nc= github.com/longhorn/backupstore v0.0.0-20240427164602-c8721e8ea31a/go.mod h1:NlOHCyQiGjn9TS1HUfQlBESttDPzi9x1Vs38geRV9SU= -github.com/longhorn/go-common-libs v0.0.0-20240411093823-b8862efb8e03 h1:RN7mq4FrbHcAeemI5tDha9u4X+RSRrPugD1cY1FHdvo= -github.com/longhorn/go-common-libs v0.0.0-20240411093823-b8862efb8e03/go.mod h1:7onp+E4hSg2DnB40dJU0Y7adrvykGg6jHxOb48imPGg= -github.com/longhorn/go-common-libs v0.0.0-20240420123020-ed4ab0cfdbea h1:v0bayAUkxSDAwknvPFwnpOSrfmRZHdVoHrfDF617hZA= -github.com/longhorn/go-common-libs v0.0.0-20240420123020-ed4ab0cfdbea/go.mod h1:3V1ZXTenmy7nCaQ555gtvp785fur1jK+seQ5gTUCEcI= -github.com/longhorn/go-common-libs v0.0.0-20240426033718-77710d2242df h1:q2a/IL7zoPkYxIMsz46E6uWDamu9z4k+h/4u4pHsdqE= -github.com/longhorn/go-common-libs v0.0.0-20240426033718-77710d2242df/go.mod h1:qppGSy9WsxH1C9T6yhSMvG53ynpasyKOH/n9e1jr8mw= github.com/longhorn/go-common-libs v0.0.0-20240427164621-70d1933bfa90 h1:uBVee6AulPsgSvsvaxdj4xIdgkIvjIqA0j7ZD+Hg/Mc= github.com/longhorn/go-common-libs v0.0.0-20240427164621-70d1933bfa90/go.mod h1:qppGSy9WsxH1C9T6yhSMvG53ynpasyKOH/n9e1jr8mw= -github.com/longhorn/go-iscsi-helper v0.0.0-20240329081212-26b6406b3b2b h1:Cp8eBy4tKAaqOfycyLcCKIzhJd+K04/WfE9/OIALOaA= -github.com/longhorn/go-iscsi-helper v0.0.0-20240329081212-26b6406b3b2b/go.mod h1:tynRAH865oFPQQw4rY4wgL7a/JEYQsAhy+DXglx51eI= -github.com/longhorn/go-iscsi-helper v0.0.0-20240417063713-e20db15bb989 h1:4ddaq015o2NoMQeNqlKOZArN/aSr1IEbK9hExDCVFVM= -github.com/longhorn/go-iscsi-helper v0.0.0-20240417063713-e20db15bb989/go.mod h1:4fs0E8kJuGqlYjXbpsQF0yEA6oOsgfDCxZAnLJuPaOU= -github.com/longhorn/go-iscsi-helper v0.0.0-20240426065530-1ff1e567f43d h1:NeeDP9AgHbYkBfYRdWboguMMPk0I+8SZWxx1cAaGf0I= -github.com/longhorn/go-iscsi-helper v0.0.0-20240426065530-1ff1e567f43d/go.mod h1:d9t3gtE+UPjescbCFluXd4xBc8OQT/JrC2cdkk2IXWQ= github.com/longhorn/go-iscsi-helper v0.0.0-20240427164656-e9439c0018ce h1:PxKniE9F6IZ2DMKfmxDsbqeAxQI1TZhnw7/HOBMs1Is= github.com/longhorn/go-iscsi-helper v0.0.0-20240427164656-e9439c0018ce/go.mod h1:d9t3gtE+UPjescbCFluXd4xBc8OQT/JrC2cdkk2IXWQ= -github.com/longhorn/sparse-tools v0.0.0-20240228120902-ce8c4c2e71ca h1:dECamLpXIlL7GRmiruGseb5xO6hGAWyu2xYm9D46mb8= -github.com/longhorn/sparse-tools v0.0.0-20240228120902-ce8c4c2e71ca/go.mod h1:pvlUkVwRGojXhcTkkzksOe4i7GVk59P2PbJjHIB2Yj0= -github.com/longhorn/sparse-tools v0.0.0-20240424162924-2651ad40ad19 h1:/bSLCJxmmtq+alVHtvPl5eDXgMHqBOzOwcCCJxtRts0= -github.com/longhorn/sparse-tools v0.0.0-20240424162924-2651ad40ad19/go.mod h1:pvlUkVwRGojXhcTkkzksOe4i7GVk59P2PbJjHIB2Yj0= github.com/longhorn/sparse-tools v0.0.0-20240427164751-a7b9f1b2c8a8 h1:lwtmZEomiv8uchwo9JIyoo+lK8J3cLCm7/qzpn6wmzo= github.com/longhorn/sparse-tools v0.0.0-20240427164751-a7b9f1b2c8a8/go.mod h1:pvlUkVwRGojXhcTkkzksOe4i7GVk59P2PbJjHIB2Yj0= -github.com/longhorn/types v0.0.0-20240417064442-e7df610ea802 h1:evjIqn8Ta4toYsdcfvUBXOyV64ZEo72CYe+Vfd+3STQ= -github.com/longhorn/types v0.0.0-20240417064442-e7df610ea802/go.mod h1:pqT+7B8T+nkyUZYe8tL3CwPDCHjkbe3mHUDY5ntJFyQ= -github.com/longhorn/types v0.0.0-20240417112740-a0d8514936b8 h1:M9TQLN379VNN3JsuLuKHDRIy/11jYeIuxYLFuekjcPw= -github.com/longhorn/types v0.0.0-20240417112740-a0d8514936b8/go.mod h1:pqT+7B8T+nkyUZYe8tL3CwPDCHjkbe3mHUDY5ntJFyQ= -github.com/longhorn/types v0.0.0-20240424162824-4995e1e42438 h1:nSuJa62e6F9YsP06Js4jnKr0AsvEMGwBRLm9fXTlmns= -github.com/longhorn/types v0.0.0-20240424162824-4995e1e42438/go.mod h1:pqT+7B8T+nkyUZYe8tL3CwPDCHjkbe3mHUDY5ntJFyQ= -github.com/longhorn/types v0.0.0-20240427164854-38dbed8528d3 h1:7YDGJTwro/kCcMmnCWM1UIL4JgervR6MT++71PvcbGY= -github.com/longhorn/types v0.0.0-20240427164854-38dbed8528d3/go.mod h1:pqT+7B8T+nkyUZYe8tL3CwPDCHjkbe3mHUDY5ntJFyQ= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -155,6 +123,8 @@ github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhV github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shuo-wu/types v0.0.0-20240429183325-93bff58b40b8 h1:74+dyJJaM7OLyv4I0E5MP3n1OIllJsW/m7z2XJaLd5I= +github.com/shuo-wu/types v0.0.0-20240429183325-93bff58b40b8/go.mod h1:pqT+7B8T+nkyUZYe8tL3CwPDCHjkbe3mHUDY5ntJFyQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slok/goresilience v0.2.0 h1:dagdIiWlhTm7BK/r/LRKz+zvw0SCNk+nHf7obdsbzxQ= @@ -176,8 +146,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= -github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -199,10 +167,6 @@ golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -273,12 +237,8 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/mount-utils v0.29.3 h1:iEcqPP7Vv8UClH8nnMfovtmy/04fIloRW9JuSXykoZ0= -k8s.io/mount-utils v0.29.3/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y= k8s.io/mount-utils v0.30.0 h1:EceYTNYVabfpdtIAHC4KgMzoZkm1B8ovZ1J666mYZQI= k8s.io/mount-utils v0.30.0/go.mod h1:9sCVmwGLcV1MPvbZ+rToMDnl1QcGozy+jBPd0MsQLIo= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= diff --git a/main.go b/main.go index 6272dcff7..c46db5f78 100644 --- a/main.go +++ b/main.go @@ -146,6 +146,7 @@ func longhornCli() { cmd.FrontendCmd(), cmd.SystemBackupCmd(), cmd.ProfilerCmd(), + cmd.BenchmarkCmd(), VersionCmd(), } a.CommandNotFound = cmdNotFound diff --git a/pkg/controller/client/controller_client.go b/pkg/controller/client/controller_client.go index 6c8808fd3..a1c73a451 100644 --- a/pkg/controller/client/controller_client.go +++ b/pkg/controller/client/controller_client.go @@ -261,6 +261,23 @@ func (c *ControllerClient) VolumeSnapshotMaxSizeSet(size int64) error { return nil } +func (c *ControllerClient) VolumeBench(benchType string, thread int, size int64) (string, error) { + controllerServiceClient := c.getControllerServiceClient() + ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) + defer cancel() + + resp, err := controllerServiceClient.VolumeBench(ctx, &enginerpc.VolumeBenchRequest{ + BenchType: benchType, + Thread: int32(thread), + Size: size, + }) + if err != nil { + return "", errors.Wrapf(err, "failed to bench %s engine for volume %v", benchType, c.VolumeName) + } + + return resp.Output, nil +} + func (c *ControllerClient) ReplicaList() ([]*types.ControllerReplicaInfo, error) { controllerServiceClient := c.getControllerServiceClient() ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) diff --git a/pkg/controller/control.go b/pkg/controller/control.go index 570e684d3..7a6836bd2 100644 --- a/pkg/controller/control.go +++ b/pkg/controller/control.go @@ -1285,3 +1285,14 @@ func (c *Controller) GetLatestMetics() *enginerpc.Metrics { func getAverageLatency(totalLatency, iops uint64) uint64 { return totalLatency / iops } + +func (c *Controller) Bench(benchType string, thread int, size int64) (output string, err error) { + if size%4096 != 0 { + return "", fmt.Errorf("failed to bench volume engine with size %v, because it is not multiple of volume block size 4096", size) + } + if size > c.size { + return "", fmt.Errorf("failed to bench volume engine with size %v, because it is greater than the engine size %v", size, c.size) + } + + return util.Bench(benchType, thread, size, c.WriteAt, c.ReadAt) +} diff --git a/pkg/controller/rpc/server.go b/pkg/controller/rpc/server.go index a2f4d6b93..426a5d19f 100644 --- a/pkg/controller/rpc/server.go +++ b/pkg/controller/rpc/server.go @@ -202,6 +202,15 @@ func (cs *ControllerServer) VolumeSnapshotMaxSizeSet(ctx context.Context, req *e return cs.getVolume(), nil } +func (cs *ControllerServer) VolumeBench(ctx context.Context, req *enginerpc.VolumeBenchRequest) (*enginerpc.VolumeBenchResponse, error) { + output, err := cs.c.Bench(req.BenchType, int(req.Thread), req.Size) + if err != nil { + return nil, err + } + + return &enginerpc.VolumeBenchResponse{Output: output}, nil +} + func (cs *ControllerServer) ReplicaList(ctx context.Context, req *emptypb.Empty) (*enginerpc.ReplicaListReply, error) { return &enginerpc.ReplicaListReply{ Replicas: cs.listControllerReplica(), diff --git a/pkg/replica/client/client.go b/pkg/replica/client/client.go index 1ecb1d40b..0e3cd4347 100644 --- a/pkg/replica/client/client.go +++ b/pkg/replica/client/client.go @@ -790,3 +790,23 @@ func (c *ReplicaClient) SnapshotHashLockState() (bool, error) { return resp.IsLocked, nil } + +func (c *ReplicaClient) Bench(benchType string, thread int, size int64) (string, error) { + replicaServiceClient, err := c.getReplicaServiceClient() + if err != nil { + return "", err + } + ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) + defer cancel() + + resp, err := replicaServiceClient.ReplicaBench(ctx, &enginerpc.ReplicaBenchRequest{ + BenchType: benchType, + Thread: int32(thread), + Size: size, + }) + if err != nil { + return "", errors.Wrapf(err, "failed to bench replica %v", c.replicaServiceURL) + } + + return resp.Output, nil +} diff --git a/pkg/replica/replica.go b/pkg/replica/replica.go index 13771e2bc..266100c67 100644 --- a/pkg/replica/replica.go +++ b/pkg/replica/replica.go @@ -1259,6 +1259,17 @@ func (r *Replica) Expand(size int64) (err error) { return nil } +func (r *Replica) Bench(benchType string, thread int, size int64) (output string, err error) { + if size%diskutil.VolumeSectorSize != 0 { + return "", fmt.Errorf("failed to bench volume replica with size %v, because it is not multiple of volume sector size %v", size, diskutil.VolumeSectorSize) + } + if size > r.info.Size { + return "", fmt.Errorf("failed to bench volume replica with size %v, because it is greater than the replica size %v", size, r.info.Size) + } + + return util.Bench(benchType, thread, size, r.WriteAt, r.ReadAt) +} + func (r *Replica) WriteAt(buf []byte, offset int64) (int, error) { if r.readOnly { return 0, fmt.Errorf("cannot write on read-only replica") diff --git a/pkg/replica/rpc/server.go b/pkg/replica/rpc/server.go index b68e8f354..24675a92f 100644 --- a/pkg/replica/rpc/server.go +++ b/pkg/replica/rpc/server.go @@ -194,6 +194,15 @@ func (rs *ReplicaServer) ReplicaExpand(ctx context.Context, req *enginerpc.Repli return &enginerpc.ReplicaExpandResponse{Replica: rs.getReplica()}, nil } +func (rs *ReplicaServer) ReplicaBench(ctx context.Context, req *enginerpc.ReplicaBenchRequest) (*enginerpc.ReplicaBenchResponse, error) { + output, err := rs.s.Bench(req.BenchType, int(req.Thread), req.Size) + if err != nil { + return nil, err + } + + return &enginerpc.ReplicaBenchResponse{Output: output}, nil +} + func (rs *ReplicaServer) DiskRemove(ctx context.Context, req *enginerpc.DiskRemoveRequest) (*enginerpc.DiskRemoveResponse, error) { if err := rs.s.RemoveDiffDisk(req.Name, req.Force); err != nil { return nil, err diff --git a/pkg/replica/server.go b/pkg/replica/server.go index a4ebbc26b..fac16c624 100644 --- a/pkg/replica/server.go +++ b/pkg/replica/server.go @@ -232,6 +232,19 @@ func (s *Server) Expand(size int64) error { return s.r.Expand(size) } +func (s *Server) Bench(benchType string, thread int, size int64) (string, error) { + s.Lock() + if s.r == nil { + s.Unlock() + return "", nil + } + s.Unlock() + + logrus.Infof("Replica server starts to bench %s with %v thread, test size %v", benchType, thread, size) + + return s.r.Bench(benchType, thread, size) +} + func (s *Server) RemoveDiffDisk(name string, force bool) error { s.Lock() defer s.Unlock() diff --git a/pkg/util/util.go b/pkg/util/util.go index 7b5d1c73f..9035cc5e9 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -3,6 +3,8 @@ package util import ( "fmt" "io" + "math" + "math/rand" "net" "net/http" "net/url" @@ -11,6 +13,7 @@ import ( "regexp" "strconv" "strings" + "sync" "syscall" "time" @@ -295,3 +298,129 @@ func UUID() string { func RandomID() string { return UUID()[:randomIDLenth] } + +var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +func RandStringRunes(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} + +func Bench(benchType string, thread int, size int64, writeAt, readAt func([]byte, int64) (int, error)) (output string, err error) { + benchTypeInList := strings.Split(benchType, "-") + if len(benchTypeInList) != 3 || + (benchTypeInList[0] != "seq" && benchTypeInList[0] != "rand") || + (benchTypeInList[1] != "iops" && benchTypeInList[1] != "bandwidth" && benchTypeInList[1] != "latency") || + (benchTypeInList[2] != "read" && benchTypeInList[2] != "write") { + return "", fmt.Errorf("invalid bench type %s", benchType) + } + + if thread != 1 && strings.Contains(benchType, "-latency-") { + logrus.Warnf("Using single thread for latency related benchmark") + thread = 1 + } + + blockSize := 4096 // 4KB + if strings.Contains(benchType, "-bandwidth-") { + blockSize = 1 << 20 // 1MB + } + + var duration time.Duration + + // Prepare data before read + if benchTypeInList[2] == "read" { + // Typically 4-thread write is enough + if _, err := dataIOWithMultipleThread(false, 4, 1<<20, size, writeAt); err != nil { + return "", err + } + + if duration, err = dataIOWithMultipleThread(benchTypeInList[0] == "rand", thread, blockSize, size, readAt); err != nil { + return "", err + } + } + + if benchTypeInList[2] == "write" { + if duration, err = dataIOWithMultipleThread(benchTypeInList[0] == "rand", thread, blockSize, size, writeAt); err != nil { + return "", err + } + } + + switch benchTypeInList[1] { + case "iops": + res := int(float64(size) / float64(blockSize) / float64(duration) * 1000000000) + output = fmt.Sprintf("instance %s %v/s, size %v, duration %vs, thread count %v", benchType, res, size, duration.Seconds(), thread) + case "bandwidth": + res := int(float64(size) / float64(duration) * 1000000000 / float64(1<<10)) + output = fmt.Sprintf("instance %s %vKB/s, size %v, duration %vs, thread count %v", benchType, res, size, duration.Seconds(), thread) + case "latency": + res := float64(duration) / 1000 / (float64(size) / float64(blockSize)) + output = fmt.Sprintf("instance %s %.2fus, size %v, duration %vs, thread count %v", benchType, res, size, duration.Seconds(), thread) + } + return output, nil +} + +func dataIOWithMultipleThread(isRandomIO bool, thread, blockSize int, size int64, ioAt func([]byte, int64) (int, error)) (duration time.Duration, err error) { + lock := sync.Mutex{} + + chunkSize := int(math.Ceil(float64(size) / float64(thread))) + chunkBlocks := int(math.Ceil(float64(chunkSize) / float64(blockSize))) + var sequenceList []int + if isRandomIO { + sequenceList = make([]int, chunkBlocks) + for i := 0; i < chunkBlocks; i++ { + sequenceList[i] = i + } + rand.Shuffle(chunkBlocks, func(i, j int) { sequenceList[i], sequenceList[j] = sequenceList[j], sequenceList[i] }) + } + + if chunkSize < blockSize { + return 0, fmt.Errorf("the io thread count is too much so that each thread cannot operate a single block") + } + + wg := sync.WaitGroup{} + wg.Add(thread) + + startTime := time.Now() + defer func() { + duration = time.Since(startTime) + }() + + for i := 0; i < thread; i++ { + idx := i + go func() { + defer wg.Done() + + // Ignore this randomly generate data if the ioAt is readAt + blockBytes := []byte(RandStringRunes(blockSize)) + + start := int64(idx) * int64(chunkSize) + end := int64(idx+1) * int64(chunkSize) + offset := start + for cnt := 0; cnt < chunkBlocks; cnt++ { + if isRandomIO { + offset = start + int64(sequenceList[cnt]*blockSize) + if offset+int64(blockSize) > end { + offset -= int64(blockSize) + } + } else { + offset = start + int64(cnt*blockSize) + if offset+int64(blockSize) > end { + blockBytes = blockBytes[:end-offset] + } + } + if _, ioErr := ioAt(blockBytes, offset); ioErr != nil { + lock.Lock() + err = ioErr + lock.Unlock() + return + } + } + }() + } + wg.Wait() + + return +} diff --git a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller.pb.go b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller.pb.go index 7df606d39..04b949930 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller.pb.go @@ -1360,6 +1360,116 @@ func (x *MetricsGetReply) GetMetrics() *Metrics { return nil } +type VolumeBenchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BenchType string `protobuf:"bytes,1,opt,name=bench_type,json=benchType,proto3" json:"bench_type,omitempty"` + Thread int32 `protobuf:"varint,2,opt,name=thread,proto3" json:"thread,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *VolumeBenchRequest) Reset() { + *x = VolumeBenchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ptypes_controller_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeBenchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeBenchRequest) ProtoMessage() {} + +func (x *VolumeBenchRequest) ProtoReflect() protoreflect.Message { + mi := &file_ptypes_controller_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeBenchRequest.ProtoReflect.Descriptor instead. +func (*VolumeBenchRequest) Descriptor() ([]byte, []int) { + return file_ptypes_controller_proto_rawDescGZIP(), []int{22} +} + +func (x *VolumeBenchRequest) GetBenchType() string { + if x != nil { + return x.BenchType + } + return "" +} + +func (x *VolumeBenchRequest) GetThread() int32 { + if x != nil { + return x.Thread + } + return 0 +} + +func (x *VolumeBenchRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type VolumeBenchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *VolumeBenchResponse) Reset() { + *x = VolumeBenchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ptypes_controller_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeBenchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeBenchResponse) ProtoMessage() {} + +func (x *VolumeBenchResponse) ProtoReflect() protoreflect.Message { + mi := &file_ptypes_controller_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeBenchResponse.ProtoReflect.Descriptor instead. +func (*VolumeBenchResponse) Descriptor() ([]byte, []int) { + return file_ptypes_controller_proto_rawDescGZIP(), []int{23} +} + +func (x *VolumeBenchResponse) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + var File_ptypes_controller_proto protoreflect.FileDescriptor var file_ptypes_controller_proto_rawDesc = []byte{ @@ -1533,10 +1643,19 @@ var file_ptypes_controller_proto_rawDesc = []byte{ 0x69, 0x63, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2a, 0x26, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x5f, 0x0a, 0x12, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x68, 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x68, 0x72, + 0x65, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2a, 0x26, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x4f, 0x10, 0x00, 0x12, 0x06, 0x0a, - 0x02, 0x52, 0x57, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x52, 0x52, 0x10, 0x02, 0x32, 0xfc, - 0x0b, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x02, 0x52, 0x57, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x52, 0x52, 0x10, 0x02, 0x32, 0xc4, + 0x0c, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0e, 0x2e, 0x70, 0x74, 0x79, 0x70, @@ -1631,11 +1750,16 @@ var file_ptypes_controller_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x33, 0x5a, - 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, - 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x72, - 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x46, 0x0a, + 0x0b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1651,7 +1775,7 @@ func file_ptypes_controller_proto_rawDescGZIP() []byte { } var file_ptypes_controller_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ptypes_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_ptypes_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_ptypes_controller_proto_goTypes = []interface{}{ (ReplicaMode)(0), // 0: ptypes.ReplicaMode (*Volume)(nil), // 1: ptypes.Volume @@ -1676,32 +1800,34 @@ var file_ptypes_controller_proto_goTypes = []interface{}{ (*VersionDetailGetReply)(nil), // 20: ptypes.VersionDetailGetReply (*Metrics)(nil), // 21: ptypes.Metrics (*MetricsGetReply)(nil), // 22: ptypes.MetricsGetReply - nil, // 23: ptypes.VolumeSnapshotRequest.LabelsEntry - (*SyncFileInfo)(nil), // 24: ptypes.SyncFileInfo - (*emptypb.Empty)(nil), // 25: google.protobuf.Empty + (*VolumeBenchRequest)(nil), // 23: ptypes.VolumeBenchRequest + (*VolumeBenchResponse)(nil), // 24: ptypes.VolumeBenchResponse + nil, // 25: ptypes.VolumeSnapshotRequest.LabelsEntry + (*SyncFileInfo)(nil), // 26: ptypes.SyncFileInfo + (*emptypb.Empty)(nil), // 27: google.protobuf.Empty } var file_ptypes_controller_proto_depIdxs = []int32{ 2, // 0: ptypes.ControllerReplica.address:type_name -> ptypes.ReplicaAddress 0, // 1: ptypes.ControllerReplica.mode:type_name -> ptypes.ReplicaMode - 23, // 2: ptypes.VolumeSnapshotRequest.labels:type_name -> ptypes.VolumeSnapshotRequest.LabelsEntry + 25, // 2: ptypes.VolumeSnapshotRequest.labels:type_name -> ptypes.VolumeSnapshotRequest.LabelsEntry 3, // 3: ptypes.ReplicaListReply.replicas:type_name -> ptypes.ControllerReplica 0, // 4: ptypes.ControllerReplicaCreateRequest.mode:type_name -> ptypes.ReplicaMode 3, // 5: ptypes.ReplicaPrepareRebuildReply.replica:type_name -> ptypes.ControllerReplica - 24, // 6: ptypes.ReplicaPrepareRebuildReply.sync_file_info_list:type_name -> ptypes.SyncFileInfo + 26, // 6: ptypes.ReplicaPrepareRebuildReply.sync_file_info_list:type_name -> ptypes.SyncFileInfo 19, // 7: ptypes.VersionDetailGetReply.version:type_name -> ptypes.VersionOutput 21, // 8: ptypes.MetricsGetReply.metrics:type_name -> ptypes.Metrics - 25, // 9: ptypes.ControllerService.VolumeGet:input_type -> google.protobuf.Empty + 27, // 9: ptypes.ControllerService.VolumeGet:input_type -> google.protobuf.Empty 4, // 10: ptypes.ControllerService.VolumeStart:input_type -> ptypes.VolumeStartRequest - 25, // 11: ptypes.ControllerService.VolumeShutdown:input_type -> google.protobuf.Empty + 27, // 11: ptypes.ControllerService.VolumeShutdown:input_type -> google.protobuf.Empty 5, // 12: ptypes.ControllerService.VolumeSnapshot:input_type -> ptypes.VolumeSnapshotRequest 7, // 13: ptypes.ControllerService.VolumeRevert:input_type -> ptypes.VolumeRevertRequest 8, // 14: ptypes.ControllerService.VolumeExpand:input_type -> ptypes.VolumeExpandRequest 9, // 15: ptypes.ControllerService.VolumeFrontendStart:input_type -> ptypes.VolumeFrontendStartRequest - 25, // 16: ptypes.ControllerService.VolumeFrontendShutdown:input_type -> google.protobuf.Empty + 27, // 16: ptypes.ControllerService.VolumeFrontendShutdown:input_type -> google.protobuf.Empty 10, // 17: ptypes.ControllerService.VolumeUnmapMarkSnapChainRemovedSet:input_type -> ptypes.VolumeUnmapMarkSnapChainRemovedSetRequest 11, // 18: ptypes.ControllerService.VolumeSnapshotMaxCountSet:input_type -> ptypes.VolumeSnapshotMaxCountSetRequest 12, // 19: ptypes.ControllerService.VolumeSnapshotMaxSizeSet:input_type -> ptypes.VolumeSnapshotMaxSizeSetRequest - 25, // 20: ptypes.ControllerService.ReplicaList:input_type -> google.protobuf.Empty + 27, // 20: ptypes.ControllerService.ReplicaList:input_type -> google.protobuf.Empty 2, // 21: ptypes.ControllerService.ReplicaGet:input_type -> ptypes.ReplicaAddress 16, // 22: ptypes.ControllerService.ControllerReplicaCreate:input_type -> ptypes.ControllerReplicaCreateRequest 2, // 23: ptypes.ControllerService.ReplicaDelete:input_type -> ptypes.ReplicaAddress @@ -1709,31 +1835,33 @@ var file_ptypes_controller_proto_depIdxs = []int32{ 2, // 25: ptypes.ControllerService.ReplicaPrepareRebuild:input_type -> ptypes.ReplicaAddress 2, // 26: ptypes.ControllerService.ReplicaVerifyRebuild:input_type -> ptypes.ReplicaAddress 18, // 27: ptypes.ControllerService.JournalList:input_type -> ptypes.JournalListRequest - 25, // 28: ptypes.ControllerService.VersionDetailGet:input_type -> google.protobuf.Empty - 25, // 29: ptypes.ControllerService.MetricsGet:input_type -> google.protobuf.Empty - 1, // 30: ptypes.ControllerService.VolumeGet:output_type -> ptypes.Volume - 1, // 31: ptypes.ControllerService.VolumeStart:output_type -> ptypes.Volume - 1, // 32: ptypes.ControllerService.VolumeShutdown:output_type -> ptypes.Volume - 6, // 33: ptypes.ControllerService.VolumeSnapshot:output_type -> ptypes.VolumeSnapshotReply - 1, // 34: ptypes.ControllerService.VolumeRevert:output_type -> ptypes.Volume - 1, // 35: ptypes.ControllerService.VolumeExpand:output_type -> ptypes.Volume - 1, // 36: ptypes.ControllerService.VolumeFrontendStart:output_type -> ptypes.Volume - 1, // 37: ptypes.ControllerService.VolumeFrontendShutdown:output_type -> ptypes.Volume - 1, // 38: ptypes.ControllerService.VolumeUnmapMarkSnapChainRemovedSet:output_type -> ptypes.Volume - 1, // 39: ptypes.ControllerService.VolumeSnapshotMaxCountSet:output_type -> ptypes.Volume - 1, // 40: ptypes.ControllerService.VolumeSnapshotMaxSizeSet:output_type -> ptypes.Volume - 15, // 41: ptypes.ControllerService.ReplicaList:output_type -> ptypes.ReplicaListReply - 3, // 42: ptypes.ControllerService.ReplicaGet:output_type -> ptypes.ControllerReplica - 3, // 43: ptypes.ControllerService.ControllerReplicaCreate:output_type -> ptypes.ControllerReplica - 25, // 44: ptypes.ControllerService.ReplicaDelete:output_type -> google.protobuf.Empty - 3, // 45: ptypes.ControllerService.ReplicaUpdate:output_type -> ptypes.ControllerReplica - 17, // 46: ptypes.ControllerService.ReplicaPrepareRebuild:output_type -> ptypes.ReplicaPrepareRebuildReply - 3, // 47: ptypes.ControllerService.ReplicaVerifyRebuild:output_type -> ptypes.ControllerReplica - 25, // 48: ptypes.ControllerService.JournalList:output_type -> google.protobuf.Empty - 20, // 49: ptypes.ControllerService.VersionDetailGet:output_type -> ptypes.VersionDetailGetReply - 22, // 50: ptypes.ControllerService.MetricsGet:output_type -> ptypes.MetricsGetReply - 30, // [30:51] is the sub-list for method output_type - 9, // [9:30] is the sub-list for method input_type + 27, // 28: ptypes.ControllerService.VersionDetailGet:input_type -> google.protobuf.Empty + 27, // 29: ptypes.ControllerService.MetricsGet:input_type -> google.protobuf.Empty + 23, // 30: ptypes.ControllerService.VolumeBench:input_type -> ptypes.VolumeBenchRequest + 1, // 31: ptypes.ControllerService.VolumeGet:output_type -> ptypes.Volume + 1, // 32: ptypes.ControllerService.VolumeStart:output_type -> ptypes.Volume + 1, // 33: ptypes.ControllerService.VolumeShutdown:output_type -> ptypes.Volume + 6, // 34: ptypes.ControllerService.VolumeSnapshot:output_type -> ptypes.VolumeSnapshotReply + 1, // 35: ptypes.ControllerService.VolumeRevert:output_type -> ptypes.Volume + 1, // 36: ptypes.ControllerService.VolumeExpand:output_type -> ptypes.Volume + 1, // 37: ptypes.ControllerService.VolumeFrontendStart:output_type -> ptypes.Volume + 1, // 38: ptypes.ControllerService.VolumeFrontendShutdown:output_type -> ptypes.Volume + 1, // 39: ptypes.ControllerService.VolumeUnmapMarkSnapChainRemovedSet:output_type -> ptypes.Volume + 1, // 40: ptypes.ControllerService.VolumeSnapshotMaxCountSet:output_type -> ptypes.Volume + 1, // 41: ptypes.ControllerService.VolumeSnapshotMaxSizeSet:output_type -> ptypes.Volume + 15, // 42: ptypes.ControllerService.ReplicaList:output_type -> ptypes.ReplicaListReply + 3, // 43: ptypes.ControllerService.ReplicaGet:output_type -> ptypes.ControllerReplica + 3, // 44: ptypes.ControllerService.ControllerReplicaCreate:output_type -> ptypes.ControllerReplica + 27, // 45: ptypes.ControllerService.ReplicaDelete:output_type -> google.protobuf.Empty + 3, // 46: ptypes.ControllerService.ReplicaUpdate:output_type -> ptypes.ControllerReplica + 17, // 47: ptypes.ControllerService.ReplicaPrepareRebuild:output_type -> ptypes.ReplicaPrepareRebuildReply + 3, // 48: ptypes.ControllerService.ReplicaVerifyRebuild:output_type -> ptypes.ControllerReplica + 27, // 49: ptypes.ControllerService.JournalList:output_type -> google.protobuf.Empty + 20, // 50: ptypes.ControllerService.VersionDetailGet:output_type -> ptypes.VersionDetailGetReply + 22, // 51: ptypes.ControllerService.MetricsGet:output_type -> ptypes.MetricsGetReply + 24, // 52: ptypes.ControllerService.VolumeBench:output_type -> ptypes.VolumeBenchResponse + 31, // [31:53] is the sub-list for method output_type + 9, // [9:31] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name @@ -2010,6 +2138,30 @@ func file_ptypes_controller_proto_init() { return nil } } + file_ptypes_controller_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeBenchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ptypes_controller_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeBenchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2017,7 +2169,7 @@ func file_ptypes_controller_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ptypes_controller_proto_rawDesc, NumEnums: 1, - NumMessages: 23, + NumMessages: 25, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller_grpc.pb.go b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller_grpc.pb.go index 69b4f62b8..58d9d5cc4 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller_grpc.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/controller_grpc.pb.go @@ -41,6 +41,7 @@ const ( ControllerService_JournalList_FullMethodName = "/ptypes.ControllerService/JournalList" ControllerService_VersionDetailGet_FullMethodName = "/ptypes.ControllerService/VersionDetailGet" ControllerService_MetricsGet_FullMethodName = "/ptypes.ControllerService/MetricsGet" + ControllerService_VolumeBench_FullMethodName = "/ptypes.ControllerService/VolumeBench" ) // ControllerServiceClient is the client API for ControllerService service. @@ -68,6 +69,7 @@ type ControllerServiceClient interface { JournalList(ctx context.Context, in *JournalListRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) VersionDetailGet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionDetailGetReply, error) MetricsGet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MetricsGetReply, error) + VolumeBench(ctx context.Context, in *VolumeBenchRequest, opts ...grpc.CallOption) (*VolumeBenchResponse, error) } type controllerServiceClient struct { @@ -267,6 +269,15 @@ func (c *controllerServiceClient) MetricsGet(ctx context.Context, in *emptypb.Em return out, nil } +func (c *controllerServiceClient) VolumeBench(ctx context.Context, in *VolumeBenchRequest, opts ...grpc.CallOption) (*VolumeBenchResponse, error) { + out := new(VolumeBenchResponse) + err := c.cc.Invoke(ctx, ControllerService_VolumeBench_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ControllerServiceServer is the server API for ControllerService service. // All implementations must embed UnimplementedControllerServiceServer // for forward compatibility @@ -292,6 +303,7 @@ type ControllerServiceServer interface { JournalList(context.Context, *JournalListRequest) (*emptypb.Empty, error) VersionDetailGet(context.Context, *emptypb.Empty) (*VersionDetailGetReply, error) MetricsGet(context.Context, *emptypb.Empty) (*MetricsGetReply, error) + VolumeBench(context.Context, *VolumeBenchRequest) (*VolumeBenchResponse, error) mustEmbedUnimplementedControllerServiceServer() } @@ -362,6 +374,9 @@ func (UnimplementedControllerServiceServer) VersionDetailGet(context.Context, *e func (UnimplementedControllerServiceServer) MetricsGet(context.Context, *emptypb.Empty) (*MetricsGetReply, error) { return nil, status.Errorf(codes.Unimplemented, "method MetricsGet not implemented") } +func (UnimplementedControllerServiceServer) VolumeBench(context.Context, *VolumeBenchRequest) (*VolumeBenchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeBench not implemented") +} func (UnimplementedControllerServiceServer) mustEmbedUnimplementedControllerServiceServer() {} // UnsafeControllerServiceServer may be embedded to opt out of forward compatibility for this service. @@ -753,6 +768,24 @@ func _ControllerService_MetricsGet_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _ControllerService_VolumeBench_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeBenchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeBench(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ControllerService_VolumeBench_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeBench(ctx, req.(*VolumeBenchRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ControllerService_ServiceDesc is the grpc.ServiceDesc for ControllerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -844,6 +877,10 @@ var ControllerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "MetricsGet", Handler: _ControllerService_MetricsGet_Handler, }, + { + MethodName: "VolumeBench", + Handler: _ControllerService_VolumeBench_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ptypes/controller.proto", diff --git a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica.pb.go b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica.pb.go index f8fba93d3..76c2e9e54 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica.pb.go @@ -1828,6 +1828,116 @@ func (x *PrepareRemoveAction) GetTarget() string { return "" } +type ReplicaBenchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BenchType string `protobuf:"bytes,1,opt,name=bench_type,json=benchType,proto3" json:"bench_type,omitempty"` + Thread int32 `protobuf:"varint,2,opt,name=thread,proto3" json:"thread,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ReplicaBenchRequest) Reset() { + *x = ReplicaBenchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ptypes_replica_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplicaBenchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplicaBenchRequest) ProtoMessage() {} + +func (x *ReplicaBenchRequest) ProtoReflect() protoreflect.Message { + mi := &file_ptypes_replica_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplicaBenchRequest.ProtoReflect.Descriptor instead. +func (*ReplicaBenchRequest) Descriptor() ([]byte, []int) { + return file_ptypes_replica_proto_rawDescGZIP(), []int{33} +} + +func (x *ReplicaBenchRequest) GetBenchType() string { + if x != nil { + return x.BenchType + } + return "" +} + +func (x *ReplicaBenchRequest) GetThread() int32 { + if x != nil { + return x.Thread + } + return 0 +} + +func (x *ReplicaBenchRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ReplicaBenchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *ReplicaBenchResponse) Reset() { + *x = ReplicaBenchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ptypes_replica_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplicaBenchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplicaBenchResponse) ProtoMessage() {} + +func (x *ReplicaBenchResponse) ProtoReflect() protoreflect.Message { + mi := &file_ptypes_replica_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplicaBenchResponse.ProtoReflect.Descriptor instead. +func (*ReplicaBenchResponse) Descriptor() ([]byte, []int) { + return file_ptypes_replica_proto_rawDescGZIP(), []int{34} +} + +func (x *ReplicaBenchResponse) GetOutput() string { + if x != nil { + return x.Output + } + return "" +} + var File_ptypes_replica_proto protoreflect.FileDescriptor var file_ptypes_replica_proto_rawDesc = []byte{ @@ -2044,105 +2154,119 @@ var file_ptypes_replica_proto_rawDesc = []byte{ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x32, 0xeb, 0x0b, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x60, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x68, 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x68, 0x72, + 0x65, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x2e, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x32, 0xb8, 0x0c, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0a, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x44, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, - 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, - 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0d, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, + 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4f, 0x70, 0x65, 0x6e, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x48, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x70, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, - 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x1c, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0f, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, + 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, - 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, - 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, - 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, - 0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, - 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x45, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x19, 0x2e, + 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, + 0x69, 0x73, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5a, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x11, 0x44, 0x69, - 0x73, 0x6b, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, - 0x20, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4d, 0x61, 0x72, - 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4d, - 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x11, + 0x44, 0x69, 0x73, 0x6b, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x12, 0x20, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4d, + 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x73, + 0x6b, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x70, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x1c, 0x55, 0x6e, 0x6d, 0x61, 0x70, 0x4d, 0x61, - 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, - 0x6e, 0x6d, 0x61, 0x70, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x6e, 0x6d, 0x61, - 0x70, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x61, - 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, - 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x70, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x53, - 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, - 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x52, 0x65, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x21, + 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x1c, 0x55, 0x6e, 0x6d, 0x61, 0x70, + 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x70, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x6e, + 0x6d, 0x61, 0x70, 0x4d, 0x61, 0x72, 0x6b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x61, 0x78, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x61, + 0x78, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x12, 0x1b, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2157,7 +2281,7 @@ func file_ptypes_replica_proto_rawDescGZIP() []byte { return file_ptypes_replica_proto_rawDescData } -var file_ptypes_replica_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_ptypes_replica_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_ptypes_replica_proto_goTypes = []interface{}{ (*ReplicaCreateRequest)(nil), // 0: ptypes.ReplicaCreateRequest (*ReplicaCreateResponse)(nil), // 1: ptypes.ReplicaCreateResponse @@ -2192,11 +2316,13 @@ var file_ptypes_replica_proto_goTypes = []interface{}{ (*DiskInfo)(nil), // 30: ptypes.DiskInfo (*Replica)(nil), // 31: ptypes.Replica (*PrepareRemoveAction)(nil), // 32: ptypes.PrepareRemoveAction - nil, // 33: ptypes.ReplicaSnapshotRequest.LabelsEntry - nil, // 34: ptypes.DiskInfo.ChildrenEntry - nil, // 35: ptypes.DiskInfo.LabelsEntry - nil, // 36: ptypes.Replica.DisksEntry - (*emptypb.Empty)(nil), // 37: google.protobuf.Empty + (*ReplicaBenchRequest)(nil), // 33: ptypes.ReplicaBenchRequest + (*ReplicaBenchResponse)(nil), // 34: ptypes.ReplicaBenchResponse + nil, // 35: ptypes.ReplicaSnapshotRequest.LabelsEntry + nil, // 36: ptypes.DiskInfo.ChildrenEntry + nil, // 37: ptypes.DiskInfo.LabelsEntry + nil, // 38: ptypes.Replica.DisksEntry + (*emptypb.Empty)(nil), // 39: google.protobuf.Empty } var file_ptypes_replica_proto_depIdxs = []int32{ 31, // 0: ptypes.ReplicaCreateResponse.replica:type_name -> ptypes.Replica @@ -2205,7 +2331,7 @@ var file_ptypes_replica_proto_depIdxs = []int32{ 31, // 3: ptypes.ReplicaCloseResponse.replica:type_name -> ptypes.Replica 31, // 4: ptypes.ReplicaReloadResponse.replica:type_name -> ptypes.Replica 31, // 5: ptypes.ReplicaRevertResponse.replica:type_name -> ptypes.Replica - 33, // 6: ptypes.ReplicaSnapshotRequest.labels:type_name -> ptypes.ReplicaSnapshotRequest.LabelsEntry + 35, // 6: ptypes.ReplicaSnapshotRequest.labels:type_name -> ptypes.ReplicaSnapshotRequest.LabelsEntry 31, // 7: ptypes.ReplicaSnapshotResponse.replica:type_name -> ptypes.Replica 31, // 8: ptypes.ReplicaExpandResponse.replica:type_name -> ptypes.Replica 31, // 9: ptypes.DiskRemoveResponse.replica:type_name -> ptypes.Replica @@ -2217,16 +2343,16 @@ var file_ptypes_replica_proto_depIdxs = []int32{ 31, // 15: ptypes.UnmapMarkDiskChainRemovedSetResponse.replica:type_name -> ptypes.Replica 31, // 16: ptypes.SnapshotMaxCountSetResponse.replica:type_name -> ptypes.Replica 31, // 17: ptypes.SnapshotMaxSizeSetResponse.replica:type_name -> ptypes.Replica - 34, // 18: ptypes.DiskInfo.children:type_name -> ptypes.DiskInfo.ChildrenEntry - 35, // 19: ptypes.DiskInfo.labels:type_name -> ptypes.DiskInfo.LabelsEntry - 36, // 20: ptypes.Replica.disks:type_name -> ptypes.Replica.DisksEntry + 36, // 18: ptypes.DiskInfo.children:type_name -> ptypes.DiskInfo.ChildrenEntry + 37, // 19: ptypes.DiskInfo.labels:type_name -> ptypes.DiskInfo.LabelsEntry + 38, // 20: ptypes.Replica.disks:type_name -> ptypes.Replica.DisksEntry 30, // 21: ptypes.Replica.DisksEntry.value:type_name -> ptypes.DiskInfo 0, // 22: ptypes.ReplicaService.ReplicaCreate:input_type -> ptypes.ReplicaCreateRequest - 37, // 23: ptypes.ReplicaService.ReplicaDelete:input_type -> google.protobuf.Empty - 37, // 24: ptypes.ReplicaService.ReplicaGet:input_type -> google.protobuf.Empty - 37, // 25: ptypes.ReplicaService.ReplicaOpen:input_type -> google.protobuf.Empty - 37, // 26: ptypes.ReplicaService.ReplicaClose:input_type -> google.protobuf.Empty - 37, // 27: ptypes.ReplicaService.ReplicaReload:input_type -> google.protobuf.Empty + 39, // 23: ptypes.ReplicaService.ReplicaDelete:input_type -> google.protobuf.Empty + 39, // 24: ptypes.ReplicaService.ReplicaGet:input_type -> google.protobuf.Empty + 39, // 25: ptypes.ReplicaService.ReplicaOpen:input_type -> google.protobuf.Empty + 39, // 26: ptypes.ReplicaService.ReplicaClose:input_type -> google.protobuf.Empty + 39, // 27: ptypes.ReplicaService.ReplicaReload:input_type -> google.protobuf.Empty 6, // 28: ptypes.ReplicaService.ReplicaRevert:input_type -> ptypes.ReplicaRevertRequest 8, // 29: ptypes.ReplicaService.ReplicaSnapshot:input_type -> ptypes.ReplicaSnapshotRequest 10, // 30: ptypes.ReplicaService.ReplicaExpand:input_type -> ptypes.ReplicaExpandRequest @@ -2239,26 +2365,28 @@ var file_ptypes_replica_proto_depIdxs = []int32{ 24, // 37: ptypes.ReplicaService.UnmapMarkDiskChainRemovedSet:input_type -> ptypes.UnmapMarkDiskChainRemovedSetRequest 26, // 38: ptypes.ReplicaService.SnapshotMaxCountSet:input_type -> ptypes.SnapshotMaxCountSetRequest 28, // 39: ptypes.ReplicaService.SnapshotMaxSizeSet:input_type -> ptypes.SnapshotMaxSizeSetRequest - 1, // 40: ptypes.ReplicaService.ReplicaCreate:output_type -> ptypes.ReplicaCreateResponse - 37, // 41: ptypes.ReplicaService.ReplicaDelete:output_type -> google.protobuf.Empty - 2, // 42: ptypes.ReplicaService.ReplicaGet:output_type -> ptypes.ReplicaGetResponse - 3, // 43: ptypes.ReplicaService.ReplicaOpen:output_type -> ptypes.ReplicaOpenResponse - 4, // 44: ptypes.ReplicaService.ReplicaClose:output_type -> ptypes.ReplicaCloseResponse - 5, // 45: ptypes.ReplicaService.ReplicaReload:output_type -> ptypes.ReplicaReloadResponse - 7, // 46: ptypes.ReplicaService.ReplicaRevert:output_type -> ptypes.ReplicaRevertResponse - 9, // 47: ptypes.ReplicaService.ReplicaSnapshot:output_type -> ptypes.ReplicaSnapshotResponse - 11, // 48: ptypes.ReplicaService.ReplicaExpand:output_type -> ptypes.ReplicaExpandResponse - 13, // 49: ptypes.ReplicaService.DiskRemove:output_type -> ptypes.DiskRemoveResponse - 15, // 50: ptypes.ReplicaService.DiskReplace:output_type -> ptypes.DiskReplaceResponse - 17, // 51: ptypes.ReplicaService.DiskPrepareRemove:output_type -> ptypes.DiskPrepareRemoveResponse - 19, // 52: ptypes.ReplicaService.DiskMarkAsRemoved:output_type -> ptypes.DiskMarkAsRemovedResponse - 21, // 53: ptypes.ReplicaService.RebuildingSet:output_type -> ptypes.RebuildingSetResponse - 23, // 54: ptypes.ReplicaService.RevisionCounterSet:output_type -> ptypes.RevisionCounterSetResponse - 25, // 55: ptypes.ReplicaService.UnmapMarkDiskChainRemovedSet:output_type -> ptypes.UnmapMarkDiskChainRemovedSetResponse - 27, // 56: ptypes.ReplicaService.SnapshotMaxCountSet:output_type -> ptypes.SnapshotMaxCountSetResponse - 29, // 57: ptypes.ReplicaService.SnapshotMaxSizeSet:output_type -> ptypes.SnapshotMaxSizeSetResponse - 40, // [40:58] is the sub-list for method output_type - 22, // [22:40] is the sub-list for method input_type + 33, // 40: ptypes.ReplicaService.ReplicaBench:input_type -> ptypes.ReplicaBenchRequest + 1, // 41: ptypes.ReplicaService.ReplicaCreate:output_type -> ptypes.ReplicaCreateResponse + 39, // 42: ptypes.ReplicaService.ReplicaDelete:output_type -> google.protobuf.Empty + 2, // 43: ptypes.ReplicaService.ReplicaGet:output_type -> ptypes.ReplicaGetResponse + 3, // 44: ptypes.ReplicaService.ReplicaOpen:output_type -> ptypes.ReplicaOpenResponse + 4, // 45: ptypes.ReplicaService.ReplicaClose:output_type -> ptypes.ReplicaCloseResponse + 5, // 46: ptypes.ReplicaService.ReplicaReload:output_type -> ptypes.ReplicaReloadResponse + 7, // 47: ptypes.ReplicaService.ReplicaRevert:output_type -> ptypes.ReplicaRevertResponse + 9, // 48: ptypes.ReplicaService.ReplicaSnapshot:output_type -> ptypes.ReplicaSnapshotResponse + 11, // 49: ptypes.ReplicaService.ReplicaExpand:output_type -> ptypes.ReplicaExpandResponse + 13, // 50: ptypes.ReplicaService.DiskRemove:output_type -> ptypes.DiskRemoveResponse + 15, // 51: ptypes.ReplicaService.DiskReplace:output_type -> ptypes.DiskReplaceResponse + 17, // 52: ptypes.ReplicaService.DiskPrepareRemove:output_type -> ptypes.DiskPrepareRemoveResponse + 19, // 53: ptypes.ReplicaService.DiskMarkAsRemoved:output_type -> ptypes.DiskMarkAsRemovedResponse + 21, // 54: ptypes.ReplicaService.RebuildingSet:output_type -> ptypes.RebuildingSetResponse + 23, // 55: ptypes.ReplicaService.RevisionCounterSet:output_type -> ptypes.RevisionCounterSetResponse + 25, // 56: ptypes.ReplicaService.UnmapMarkDiskChainRemovedSet:output_type -> ptypes.UnmapMarkDiskChainRemovedSetResponse + 27, // 57: ptypes.ReplicaService.SnapshotMaxCountSet:output_type -> ptypes.SnapshotMaxCountSetResponse + 29, // 58: ptypes.ReplicaService.SnapshotMaxSizeSet:output_type -> ptypes.SnapshotMaxSizeSetResponse + 34, // 59: ptypes.ReplicaService.ReplicaBench:output_type -> ptypes.ReplicaBenchResponse + 41, // [41:60] is the sub-list for method output_type + 22, // [22:41] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name 22, // [22:22] is the sub-list for extension extendee 0, // [0:22] is the sub-list for field type_name @@ -2666,6 +2794,30 @@ func file_ptypes_replica_proto_init() { return nil } } + file_ptypes_replica_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplicaBenchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ptypes_replica_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplicaBenchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2673,7 +2825,7 @@ func file_ptypes_replica_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ptypes_replica_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 39, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica_grpc.pb.go b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica_grpc.pb.go index 31305f848..25d476d14 100644 --- a/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica_grpc.pb.go +++ b/vendor/github.com/longhorn/types/pkg/generated/enginerpc/replica_grpc.pb.go @@ -38,6 +38,7 @@ const ( ReplicaService_UnmapMarkDiskChainRemovedSet_FullMethodName = "/ptypes.ReplicaService/UnmapMarkDiskChainRemovedSet" ReplicaService_SnapshotMaxCountSet_FullMethodName = "/ptypes.ReplicaService/SnapshotMaxCountSet" ReplicaService_SnapshotMaxSizeSet_FullMethodName = "/ptypes.ReplicaService/SnapshotMaxSizeSet" + ReplicaService_ReplicaBench_FullMethodName = "/ptypes.ReplicaService/ReplicaBench" ) // ReplicaServiceClient is the client API for ReplicaService service. @@ -62,6 +63,7 @@ type ReplicaServiceClient interface { UnmapMarkDiskChainRemovedSet(ctx context.Context, in *UnmapMarkDiskChainRemovedSetRequest, opts ...grpc.CallOption) (*UnmapMarkDiskChainRemovedSetResponse, error) SnapshotMaxCountSet(ctx context.Context, in *SnapshotMaxCountSetRequest, opts ...grpc.CallOption) (*SnapshotMaxCountSetResponse, error) SnapshotMaxSizeSet(ctx context.Context, in *SnapshotMaxSizeSetRequest, opts ...grpc.CallOption) (*SnapshotMaxSizeSetResponse, error) + ReplicaBench(ctx context.Context, in *ReplicaBenchRequest, opts ...grpc.CallOption) (*ReplicaBenchResponse, error) } type replicaServiceClient struct { @@ -234,6 +236,15 @@ func (c *replicaServiceClient) SnapshotMaxSizeSet(ctx context.Context, in *Snaps return out, nil } +func (c *replicaServiceClient) ReplicaBench(ctx context.Context, in *ReplicaBenchRequest, opts ...grpc.CallOption) (*ReplicaBenchResponse, error) { + out := new(ReplicaBenchResponse) + err := c.cc.Invoke(ctx, ReplicaService_ReplicaBench_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ReplicaServiceServer is the server API for ReplicaService service. // All implementations must embed UnimplementedReplicaServiceServer // for forward compatibility @@ -256,6 +267,7 @@ type ReplicaServiceServer interface { UnmapMarkDiskChainRemovedSet(context.Context, *UnmapMarkDiskChainRemovedSetRequest) (*UnmapMarkDiskChainRemovedSetResponse, error) SnapshotMaxCountSet(context.Context, *SnapshotMaxCountSetRequest) (*SnapshotMaxCountSetResponse, error) SnapshotMaxSizeSet(context.Context, *SnapshotMaxSizeSetRequest) (*SnapshotMaxSizeSetResponse, error) + ReplicaBench(context.Context, *ReplicaBenchRequest) (*ReplicaBenchResponse, error) mustEmbedUnimplementedReplicaServiceServer() } @@ -317,6 +329,9 @@ func (UnimplementedReplicaServiceServer) SnapshotMaxCountSet(context.Context, *S func (UnimplementedReplicaServiceServer) SnapshotMaxSizeSet(context.Context, *SnapshotMaxSizeSetRequest) (*SnapshotMaxSizeSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SnapshotMaxSizeSet not implemented") } +func (UnimplementedReplicaServiceServer) ReplicaBench(context.Context, *ReplicaBenchRequest) (*ReplicaBenchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaBench not implemented") +} func (UnimplementedReplicaServiceServer) mustEmbedUnimplementedReplicaServiceServer() {} // UnsafeReplicaServiceServer may be embedded to opt out of forward compatibility for this service. @@ -654,6 +669,24 @@ func _ReplicaService_SnapshotMaxSizeSet_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _ReplicaService_ReplicaBench_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaBenchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaBench(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReplicaService_ReplicaBench_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaBench(ctx, req.(*ReplicaBenchRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ReplicaService_ServiceDesc is the grpc.ServiceDesc for ReplicaService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -733,6 +766,10 @@ var ReplicaService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SnapshotMaxSizeSet", Handler: _ReplicaService_SnapshotMaxSizeSet_Handler, }, + { + MethodName: "ReplicaBench", + Handler: _ReplicaService_ReplicaBench_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ptypes/replica.proto", diff --git a/vendor/modules.txt b/vendor/modules.txt index 0841a1fc8..2be9bca10 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -171,7 +171,7 @@ github.com/longhorn/sparse-tools/sparse/rest github.com/longhorn/sparse-tools/stats github.com/longhorn/sparse-tools/types github.com/longhorn/sparse-tools/util -# github.com/longhorn/types v0.0.0-20240427164854-38dbed8528d3 +# github.com/longhorn/types v0.0.0-20240427164854-38dbed8528d3 => github.com/shuo-wu/types v0.0.0-20240429183325-93bff58b40b8 ## explicit; go 1.21 github.com/longhorn/types/pkg/generated/enginerpc # github.com/mattn/go-colorable v0.1.4 @@ -423,3 +423,4 @@ k8s.io/utils/clock k8s.io/utils/exec k8s.io/utils/io k8s.io/utils/keymutex +# github.com/longhorn/types => github.com/shuo-wu/types v0.0.0-20240429183325-93bff58b40b8