From 80e66be1591582f739e2fb110e14ef3eb702598a Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:03:51 +0900 Subject: [PATCH 01/11] =?UTF-8?q?:sparkles:=20protobuf=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buf.yaml | 10 ++++++++++ proto/README.md | 11 +++++++++++ proto/portal/v1/benchmark.proto | 35 +++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 buf.yaml create mode 100644 proto/README.md create mode 100644 proto/portal/v1/benchmark.proto diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..bb642a0 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,10 @@ +# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml +version: v2 +lint: + use: + - STANDARD +breaking: + use: + - FILE +modules: + - path: "proto" diff --git a/proto/README.md b/proto/README.md new file mode 100644 index 0000000..3652836 --- /dev/null +++ b/proto/README.md @@ -0,0 +1,11 @@ +# protobuf + +ポータルとベンチマーカーを実行する「runner」の通信を担当する。gRPCを使用する。 + +## 処理の流れ + +1. runnerがポータルにベンチマーカーキューの先頭を問い合わせる。ポータルは先頭のベンチマークIDを返す。(`GetBenchmarkJob`) + 1. キューが空の場合は、一定時間待機して再度問い合わせる。 +2. runnerはベンチマークを実行し、client streamを使って一定時間ごとに結果をポータルに送信する。(`SendBenchmarkResult`) +3. ベンチマークが終了したら、runnerはポータルにベンチマークが終了したことを通知する。(`PostJobFinished`) +4. 1に戻る。 diff --git a/proto/portal/v1/benchmark.proto b/proto/portal/v1/benchmark.proto new file mode 100644 index 0000000..8a90bf8 --- /dev/null +++ b/proto/portal/v1/benchmark.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package portal.v1; + +import "google/protobuf/timestamp.proto"; + +message GetBenchmarkJobRequest {} + +message GetBenchmarkJobResponse { + optional string benchmark_id = 1; + bool exist = 2; +} + +message SendBenchmarkResultRequest { + string benchmark_id = 1; + google.protobuf.Timestamp started_at = 2; + string stdout = 3; // stdout, stderrどちらも、実行中でも全てのログを送る + string stderr = 4; + int64 score = 5; +} + +message SendBenchmarkResultResponse {} + +message PostJobFinishedRequest { + string benchmark_id = 1; + google.protobuf.Timestamp finished_at = 2; +} + +message PostJobFinishedResponse {} + +service BenchmarkService { + rpc GetBenchmarkJob(GetBenchmarkJobRequest) returns (GetBenchmarkJobResponse); + rpc SendBenchmarkResult(stream SendBenchmarkResultRequest) returns (SendBenchmarkResultResponse); + rpc PostJobFinished(PostJobFinishedRequest) returns (PostJobFinishedResponse); +} From da4500fff9aef11ba101701324a87c9b1cc33346 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:04:37 +0900 Subject: [PATCH 02/11] =?UTF-8?q?:sparkles:=20Go=E3=81=AE=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buf.gen.yaml | 20 ++ gen/portal/v1/benchmark.pb.go | 446 +++++++++++++++++++++++++++++ gen/portal/v1/benchmark_grpc.pb.go | 191 ++++++++++++ go.mod | 3 + go.sum | 22 ++ 5 files changed, 682 insertions(+) create mode 100644 buf.gen.yaml create mode 100644 gen/portal/v1/benchmark.pb.go create mode 100644 gen/portal/v1/benchmark_grpc.pb.go diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..3096f01 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,20 @@ +version: v2 +managed: + enabled: true + override: + - file_option: go_package_prefix + value: github.com/traPtitech/piscon-portal-v2/proto/gen + # Remove `disable` field if googleapis is not used + disable: + - module: buf.build/googleapis/googleapis + file_option: go_package_prefix +plugins: + - remote: buf.build/grpc/go:v1.5.1 + out: gen + opt: + - paths=source_relative + # dependencies + - remote: buf.build/protocolbuffers/go:v1.36.1 + out: gen + opt: + - paths=source_relative diff --git a/gen/portal/v1/benchmark.pb.go b/gen/portal/v1/benchmark.pb.go new file mode 100644 index 0000000..5f3137d --- /dev/null +++ b/gen/portal/v1/benchmark.pb.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: portal/v1/benchmark.proto + +package portalv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetBenchmarkJobRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBenchmarkJobRequest) Reset() { + *x = GetBenchmarkJobRequest{} + mi := &file_portal_v1_benchmark_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBenchmarkJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBenchmarkJobRequest) ProtoMessage() {} + +func (x *GetBenchmarkJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBenchmarkJobRequest.ProtoReflect.Descriptor instead. +func (*GetBenchmarkJobRequest) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{0} +} + +type GetBenchmarkJobResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + BenchmarkId *string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3,oneof" json:"benchmark_id,omitempty"` + Exist bool `protobuf:"varint,2,opt,name=exist,proto3" json:"exist,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBenchmarkJobResponse) Reset() { + *x = GetBenchmarkJobResponse{} + mi := &file_portal_v1_benchmark_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBenchmarkJobResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBenchmarkJobResponse) ProtoMessage() {} + +func (x *GetBenchmarkJobResponse) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBenchmarkJobResponse.ProtoReflect.Descriptor instead. +func (*GetBenchmarkJobResponse) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{1} +} + +func (x *GetBenchmarkJobResponse) GetBenchmarkId() string { + if x != nil && x.BenchmarkId != nil { + return *x.BenchmarkId + } + return "" +} + +func (x *GetBenchmarkJobResponse) GetExist() bool { + if x != nil { + return x.Exist + } + return false +} + +type SendBenchmarkResultRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + Stdout string `protobuf:"bytes,3,opt,name=stdout,proto3" json:"stdout,omitempty"` // stdout, stderrどちらも、実行中でも全てのログを送る + Stderr string `protobuf:"bytes,4,opt,name=stderr,proto3" json:"stderr,omitempty"` + Score int64 `protobuf:"varint,5,opt,name=score,proto3" json:"score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendBenchmarkResultRequest) Reset() { + *x = SendBenchmarkResultRequest{} + mi := &file_portal_v1_benchmark_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendBenchmarkResultRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendBenchmarkResultRequest) ProtoMessage() {} + +func (x *SendBenchmarkResultRequest) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendBenchmarkResultRequest.ProtoReflect.Descriptor instead. +func (*SendBenchmarkResultRequest) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{2} +} + +func (x *SendBenchmarkResultRequest) GetBenchmarkId() string { + if x != nil { + return x.BenchmarkId + } + return "" +} + +func (x *SendBenchmarkResultRequest) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *SendBenchmarkResultRequest) GetStdout() string { + if x != nil { + return x.Stdout + } + return "" +} + +func (x *SendBenchmarkResultRequest) GetStderr() string { + if x != nil { + return x.Stderr + } + return "" +} + +func (x *SendBenchmarkResultRequest) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +type SendBenchmarkResultResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendBenchmarkResultResponse) Reset() { + *x = SendBenchmarkResultResponse{} + mi := &file_portal_v1_benchmark_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendBenchmarkResultResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendBenchmarkResultResponse) ProtoMessage() {} + +func (x *SendBenchmarkResultResponse) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendBenchmarkResultResponse.ProtoReflect.Descriptor instead. +func (*SendBenchmarkResultResponse) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{3} +} + +type PostJobFinishedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostJobFinishedRequest) Reset() { + *x = PostJobFinishedRequest{} + mi := &file_portal_v1_benchmark_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostJobFinishedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostJobFinishedRequest) ProtoMessage() {} + +func (x *PostJobFinishedRequest) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostJobFinishedRequest.ProtoReflect.Descriptor instead. +func (*PostJobFinishedRequest) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{4} +} + +func (x *PostJobFinishedRequest) GetBenchmarkId() string { + if x != nil { + return x.BenchmarkId + } + return "" +} + +func (x *PostJobFinishedRequest) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +type PostJobFinishedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostJobFinishedResponse) Reset() { + *x = PostJobFinishedResponse{} + mi := &file_portal_v1_benchmark_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostJobFinishedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostJobFinishedResponse) ProtoMessage() {} + +func (x *PostJobFinishedResponse) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostJobFinishedResponse.ProtoReflect.Descriptor instead. +func (*PostJobFinishedResponse) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{5} +} + +var File_portal_v1_benchmark_proto protoreflect.FileDescriptor + +var file_portal_v1_benchmark_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x68, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0c, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x1a, + 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x39, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x1d, + 0x0a, 0x1b, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, + 0x16, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x4a, + 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xae, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x66, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x50, 0x6f, 0x73, + 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x70, + 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, 0x76, 0x32, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, + 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_portal_v1_benchmark_proto_rawDescOnce sync.Once + file_portal_v1_benchmark_proto_rawDescData = file_portal_v1_benchmark_proto_rawDesc +) + +func file_portal_v1_benchmark_proto_rawDescGZIP() []byte { + file_portal_v1_benchmark_proto_rawDescOnce.Do(func() { + file_portal_v1_benchmark_proto_rawDescData = protoimpl.X.CompressGZIP(file_portal_v1_benchmark_proto_rawDescData) + }) + return file_portal_v1_benchmark_proto_rawDescData +} + +var file_portal_v1_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_portal_v1_benchmark_proto_goTypes = []any{ + (*GetBenchmarkJobRequest)(nil), // 0: portal.v1.GetBenchmarkJobRequest + (*GetBenchmarkJobResponse)(nil), // 1: portal.v1.GetBenchmarkJobResponse + (*SendBenchmarkResultRequest)(nil), // 2: portal.v1.SendBenchmarkResultRequest + (*SendBenchmarkResultResponse)(nil), // 3: portal.v1.SendBenchmarkResultResponse + (*PostJobFinishedRequest)(nil), // 4: portal.v1.PostJobFinishedRequest + (*PostJobFinishedResponse)(nil), // 5: portal.v1.PostJobFinishedResponse + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_portal_v1_benchmark_proto_depIdxs = []int32{ + 6, // 0: portal.v1.SendBenchmarkResultRequest.started_at:type_name -> google.protobuf.Timestamp + 6, // 1: portal.v1.PostJobFinishedRequest.finished_at:type_name -> google.protobuf.Timestamp + 0, // 2: portal.v1.BenchmarkService.GetBenchmarkJob:input_type -> portal.v1.GetBenchmarkJobRequest + 2, // 3: portal.v1.BenchmarkService.SendBenchmarkResult:input_type -> portal.v1.SendBenchmarkResultRequest + 4, // 4: portal.v1.BenchmarkService.PostJobFinished:input_type -> portal.v1.PostJobFinishedRequest + 1, // 5: portal.v1.BenchmarkService.GetBenchmarkJob:output_type -> portal.v1.GetBenchmarkJobResponse + 3, // 6: portal.v1.BenchmarkService.SendBenchmarkResult:output_type -> portal.v1.SendBenchmarkResultResponse + 5, // 7: portal.v1.BenchmarkService.PostJobFinished:output_type -> portal.v1.PostJobFinishedResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_portal_v1_benchmark_proto_init() } +func file_portal_v1_benchmark_proto_init() { + if File_portal_v1_benchmark_proto != nil { + return + } + file_portal_v1_benchmark_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_portal_v1_benchmark_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_portal_v1_benchmark_proto_goTypes, + DependencyIndexes: file_portal_v1_benchmark_proto_depIdxs, + MessageInfos: file_portal_v1_benchmark_proto_msgTypes, + }.Build() + File_portal_v1_benchmark_proto = out.File + file_portal_v1_benchmark_proto_rawDesc = nil + file_portal_v1_benchmark_proto_goTypes = nil + file_portal_v1_benchmark_proto_depIdxs = nil +} diff --git a/gen/portal/v1/benchmark_grpc.pb.go b/gen/portal/v1/benchmark_grpc.pb.go new file mode 100644 index 0000000..d4b46bd --- /dev/null +++ b/gen/portal/v1/benchmark_grpc.pb.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: portal/v1/benchmark.proto + +package portalv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + BenchmarkService_GetBenchmarkJob_FullMethodName = "/portal.v1.BenchmarkService/GetBenchmarkJob" + BenchmarkService_SendBenchmarkResult_FullMethodName = "/portal.v1.BenchmarkService/SendBenchmarkResult" + BenchmarkService_PostJobFinished_FullMethodName = "/portal.v1.BenchmarkService/PostJobFinished" +) + +// BenchmarkServiceClient is the client API for BenchmarkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BenchmarkServiceClient interface { + GetBenchmarkJob(ctx context.Context, in *GetBenchmarkJobRequest, opts ...grpc.CallOption) (*GetBenchmarkJobResponse, error) + SendBenchmarkResult(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse], error) + PostJobFinished(ctx context.Context, in *PostJobFinishedRequest, opts ...grpc.CallOption) (*PostJobFinishedResponse, error) +} + +type benchmarkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBenchmarkServiceClient(cc grpc.ClientConnInterface) BenchmarkServiceClient { + return &benchmarkServiceClient{cc} +} + +func (c *benchmarkServiceClient) GetBenchmarkJob(ctx context.Context, in *GetBenchmarkJobRequest, opts ...grpc.CallOption) (*GetBenchmarkJobResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBenchmarkJobResponse) + err := c.cc.Invoke(ctx, BenchmarkService_GetBenchmarkJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *benchmarkServiceClient) SendBenchmarkResult(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[0], BenchmarkService_SendBenchmarkResult_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[SendBenchmarkResultRequest, SendBenchmarkResultResponse]{ClientStream: stream} + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BenchmarkService_SendBenchmarkResultClient = grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse] + +func (c *benchmarkServiceClient) PostJobFinished(ctx context.Context, in *PostJobFinishedRequest, opts ...grpc.CallOption) (*PostJobFinishedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PostJobFinishedResponse) + err := c.cc.Invoke(ctx, BenchmarkService_PostJobFinished_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BenchmarkServiceServer is the server API for BenchmarkService service. +// All implementations must embed UnimplementedBenchmarkServiceServer +// for forward compatibility. +type BenchmarkServiceServer interface { + GetBenchmarkJob(context.Context, *GetBenchmarkJobRequest) (*GetBenchmarkJobResponse, error) + SendBenchmarkResult(grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse]) error + PostJobFinished(context.Context, *PostJobFinishedRequest) (*PostJobFinishedResponse, error) + mustEmbedUnimplementedBenchmarkServiceServer() +} + +// UnimplementedBenchmarkServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBenchmarkServiceServer struct{} + +func (UnimplementedBenchmarkServiceServer) GetBenchmarkJob(context.Context, *GetBenchmarkJobRequest) (*GetBenchmarkJobResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBenchmarkJob not implemented") +} +func (UnimplementedBenchmarkServiceServer) SendBenchmarkResult(grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse]) error { + return status.Errorf(codes.Unimplemented, "method SendBenchmarkResult not implemented") +} +func (UnimplementedBenchmarkServiceServer) PostJobFinished(context.Context, *PostJobFinishedRequest) (*PostJobFinishedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PostJobFinished not implemented") +} +func (UnimplementedBenchmarkServiceServer) mustEmbedUnimplementedBenchmarkServiceServer() {} +func (UnimplementedBenchmarkServiceServer) testEmbeddedByValue() {} + +// UnsafeBenchmarkServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BenchmarkServiceServer will +// result in compilation errors. +type UnsafeBenchmarkServiceServer interface { + mustEmbedUnimplementedBenchmarkServiceServer() +} + +func RegisterBenchmarkServiceServer(s grpc.ServiceRegistrar, srv BenchmarkServiceServer) { + // If the following call pancis, it indicates UnimplementedBenchmarkServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&BenchmarkService_ServiceDesc, srv) +} + +func _BenchmarkService_GetBenchmarkJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBenchmarkJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BenchmarkServiceServer).GetBenchmarkJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BenchmarkService_GetBenchmarkJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BenchmarkServiceServer).GetBenchmarkJob(ctx, req.(*GetBenchmarkJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BenchmarkService_SendBenchmarkResult_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(BenchmarkServiceServer).SendBenchmarkResult(&grpc.GenericServerStream[SendBenchmarkResultRequest, SendBenchmarkResultResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BenchmarkService_SendBenchmarkResultServer = grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse] + +func _BenchmarkService_PostJobFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostJobFinishedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BenchmarkServiceServer).PostJobFinished(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BenchmarkService_PostJobFinished_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BenchmarkServiceServer).PostJobFinished(ctx, req.(*PostJobFinishedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BenchmarkService_ServiceDesc is the grpc.ServiceDesc for BenchmarkService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BenchmarkService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "portal.v1.BenchmarkService", + HandlerType: (*BenchmarkServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetBenchmarkJob", + Handler: _BenchmarkService_GetBenchmarkJob_Handler, + }, + { + MethodName: "PostJobFinished", + Handler: _BenchmarkService_PostJobFinished_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SendBenchmarkResult", + Handler: _BenchmarkService_SendBenchmarkResult_Handler, + ClientStreams: true, + }, + }, + Metadata: "portal/v1/benchmark.proto", +} diff --git a/go.mod b/go.mod index 808d41d..3ee8859 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,8 @@ require ( github.com/stephenafamo/bob v0.29.0 go.uber.org/mock v0.5.0 golang.org/x/oauth2 v0.25.0 + google.golang.org/grpc v1.69.2 + google.golang.org/protobuf v1.36.1 ) require ( @@ -43,4 +45,5 @@ require ( golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.8.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect ) diff --git a/go.sum b/go.sum index 7cd58b0..edebf50 100644 --- a/go.sum +++ b/go.sum @@ -19,10 +19,16 @@ github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg= github.com/go-faster/jx v1.1.0/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk= github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -74,6 +80,16 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -96,6 +112,12 @@ golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From e4a5521477caf596fd6b1a531e9ab3c5329bc648 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:14:48 +0900 Subject: [PATCH 03/11] =?UTF-8?q?:memo:=20gRPC=E9=96=A2=E9=80=A3=E3=81=AE?= =?UTF-8?q?=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ Taskfile.yml | 15 ++++++++++++++- proto/README.md | 19 ++++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e93bbfe..6408c84 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,7 @@ CLIENT_SECRET=my-client-secret ``` traQで作成するClientは リダイレクトURL に `http://localhost:8080/api/oauth2/callback`、スコープに `openid`, `profile` を指定します。 `task run-server` で portal server が 8080番 ポートで起動します。 + +## protobuf について + +[proto/README.md](proto/README.md) を参照してください。 diff --git a/Taskfile.yml b/Taskfile.yml index eeb524d..86bfdf7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -13,7 +13,7 @@ tasks: cmds: - go test -cover -race ./... - gen: + go:gen: cmds: - task: up-db - go generate ./... @@ -26,6 +26,19 @@ tasks: - server/openapi/*.go - server/models/**/*.go + proto:gen: + cmds: + - buf generate + sources: + - proto/**/*.proto + generates: + - gen/** + + gen: + cmds: + - task: go:gen + - task: proto:gen + up-db: cmds: - docker compose up -d --wait db diff --git a/proto/README.md b/proto/README.md index 3652836..a24b3cc 100644 --- a/proto/README.md +++ b/proto/README.md @@ -1,7 +1,24 @@ -# protobuf +# proto ポータルとベンチマーカーを実行する「runner」の通信を担当する。gRPCを使用する。 +## 環境 + +protobufのコード生成を行うためには、[`buf`](https://buf.build/docs) が必要。[公式のインストール方法のドキュメント](https://buf.build/docs/installation/)を参照すること。 +コード生成を行わない場合、bufは不要。 + +## コード生成 + +```sh +task proto:gen +``` + +もしくは + +```sh +buf generate +``` + ## 処理の流れ 1. runnerがポータルにベンチマーカーキューの先頭を問い合わせる。ポータルは先頭のベンチマークIDを返す。(`GetBenchmarkJob`) From 18728fb9e4c69b487c08da9a51dc9528ba6d1430 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:17:28 +0900 Subject: [PATCH 04/11] =?UTF-8?q?:adhesive=5Fbandage:=20passed=E3=82=84fai?= =?UTF-8?q?led=E3=82=92=E8=BF=94=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/portal/v1/benchmark.pb.go | 271 ++++++++++++++++++----------- gen/portal/v1/benchmark_grpc.pb.go | 32 ++-- proto/portal/v1/benchmark.proto | 16 +- 3 files changed, 202 insertions(+), 117 deletions(-) diff --git a/gen/portal/v1/benchmark.pb.go b/gen/portal/v1/benchmark.pb.go index 5f3137d..76879e0 100644 --- a/gen/portal/v1/benchmark.pb.go +++ b/gen/portal/v1/benchmark.pb.go @@ -21,6 +21,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type BenchmarkResult int32 + +const ( + BenchmarkResult_BENCHMARK_RESULT_UNSPECIFIED BenchmarkResult = 0 + BenchmarkResult_BENCHMARK_RESULT_PASSED BenchmarkResult = 1 + BenchmarkResult_BENCHMARK_RESULT_FAILED BenchmarkResult = 2 + BenchmarkResult_BENCHMARK_RESULT_ERROR BenchmarkResult = 3 +) + +// Enum value maps for BenchmarkResult. +var ( + BenchmarkResult_name = map[int32]string{ + 0: "BENCHMARK_RESULT_UNSPECIFIED", + 1: "BENCHMARK_RESULT_PASSED", + 2: "BENCHMARK_RESULT_FAILED", + 3: "BENCHMARK_RESULT_ERROR", + } + BenchmarkResult_value = map[string]int32{ + "BENCHMARK_RESULT_UNSPECIFIED": 0, + "BENCHMARK_RESULT_PASSED": 1, + "BENCHMARK_RESULT_FAILED": 2, + "BENCHMARK_RESULT_ERROR": 3, + } +) + +func (x BenchmarkResult) Enum() *BenchmarkResult { + p := new(BenchmarkResult) + *p = x + return p +} + +func (x BenchmarkResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BenchmarkResult) Descriptor() protoreflect.EnumDescriptor { + return file_portal_v1_benchmark_proto_enumTypes[0].Descriptor() +} + +func (BenchmarkResult) Type() protoreflect.EnumType { + return &file_portal_v1_benchmark_proto_enumTypes[0] +} + +func (x BenchmarkResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BenchmarkResult.Descriptor instead. +func (BenchmarkResult) EnumDescriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{0} +} + type GetBenchmarkJobRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -109,7 +161,7 @@ func (x *GetBenchmarkJobResponse) GetExist() bool { return false } -type SendBenchmarkResultRequest struct { +type SendBenchmarkProgressRequest struct { state protoimpl.MessageState `protogen:"open.v1"` BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` @@ -120,20 +172,20 @@ type SendBenchmarkResultRequest struct { sizeCache protoimpl.SizeCache } -func (x *SendBenchmarkResultRequest) Reset() { - *x = SendBenchmarkResultRequest{} +func (x *SendBenchmarkProgressRequest) Reset() { + *x = SendBenchmarkProgressRequest{} mi := &file_portal_v1_benchmark_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SendBenchmarkResultRequest) String() string { +func (x *SendBenchmarkProgressRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SendBenchmarkResultRequest) ProtoMessage() {} +func (*SendBenchmarkProgressRequest) ProtoMessage() {} -func (x *SendBenchmarkResultRequest) ProtoReflect() protoreflect.Message { +func (x *SendBenchmarkProgressRequest) ProtoReflect() protoreflect.Message { mi := &file_portal_v1_benchmark_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -145,66 +197,66 @@ func (x *SendBenchmarkResultRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SendBenchmarkResultRequest.ProtoReflect.Descriptor instead. -func (*SendBenchmarkResultRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SendBenchmarkProgressRequest.ProtoReflect.Descriptor instead. +func (*SendBenchmarkProgressRequest) Descriptor() ([]byte, []int) { return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{2} } -func (x *SendBenchmarkResultRequest) GetBenchmarkId() string { +func (x *SendBenchmarkProgressRequest) GetBenchmarkId() string { if x != nil { return x.BenchmarkId } return "" } -func (x *SendBenchmarkResultRequest) GetStartedAt() *timestamppb.Timestamp { +func (x *SendBenchmarkProgressRequest) GetStartedAt() *timestamppb.Timestamp { if x != nil { return x.StartedAt } return nil } -func (x *SendBenchmarkResultRequest) GetStdout() string { +func (x *SendBenchmarkProgressRequest) GetStdout() string { if x != nil { return x.Stdout } return "" } -func (x *SendBenchmarkResultRequest) GetStderr() string { +func (x *SendBenchmarkProgressRequest) GetStderr() string { if x != nil { return x.Stderr } return "" } -func (x *SendBenchmarkResultRequest) GetScore() int64 { +func (x *SendBenchmarkProgressRequest) GetScore() int64 { if x != nil { return x.Score } return 0 } -type SendBenchmarkResultResponse struct { +type SendBenchmarkProgressResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SendBenchmarkResultResponse) Reset() { - *x = SendBenchmarkResultResponse{} +func (x *SendBenchmarkProgressResponse) Reset() { + *x = SendBenchmarkProgressResponse{} mi := &file_portal_v1_benchmark_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SendBenchmarkResultResponse) String() string { +func (x *SendBenchmarkProgressResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SendBenchmarkResultResponse) ProtoMessage() {} +func (*SendBenchmarkProgressResponse) ProtoMessage() {} -func (x *SendBenchmarkResultResponse) ProtoReflect() protoreflect.Message { +func (x *SendBenchmarkProgressResponse) ProtoReflect() protoreflect.Message { mi := &file_portal_v1_benchmark_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -216,15 +268,16 @@ func (x *SendBenchmarkResultResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SendBenchmarkResultResponse.ProtoReflect.Descriptor instead. -func (*SendBenchmarkResultResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SendBenchmarkProgressResponse.ProtoReflect.Descriptor instead. +func (*SendBenchmarkProgressResponse) Descriptor() ([]byte, []int) { return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{3} } type PostJobFinishedRequest struct { state protoimpl.MessageState `protogen:"open.v1"` BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + Result BenchmarkResult `protobuf:"varint,2,opt,name=result,proto3,enum=portal.v1.BenchmarkResult" json:"result,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -266,6 +319,13 @@ func (x *PostJobFinishedRequest) GetBenchmarkId() string { return "" } +func (x *PostJobFinishedRequest) GetResult() BenchmarkResult { + if x != nil { + return x.Result + } + return BenchmarkResult_BENCHMARK_RESULT_UNSPECIFIED +} + func (x *PostJobFinishedRequest) GetFinishedAt() *timestamppb.Timestamp { if x != nil { return x.FinishedAt @@ -324,61 +384,74 @@ var file_portal_v1_benchmark_proto_rawDesc = []byte{ 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x1a, - 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, - 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x39, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x1d, - 0x0a, 0x1b, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, - 0x16, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, - 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x4a, - 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xae, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x65, - 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, - 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, - 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x66, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, - 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x1c, + 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, + 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x64, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, + 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1a, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, + 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x89, 0x01, 0x0a, 0x0f, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x20, 0x0a, 0x1c, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, + 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, + 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, + 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, + 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xb4, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, + 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x27, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, - 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x50, 0x6f, 0x73, - 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x70, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, - 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x70, - 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, 0x76, 0x32, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, - 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, - 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, + 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, + 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, + 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x70, 0x69, 0x73, 0x63, 0x6f, 0x6e, + 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -393,30 +466,33 @@ func file_portal_v1_benchmark_proto_rawDescGZIP() []byte { return file_portal_v1_benchmark_proto_rawDescData } +var file_portal_v1_benchmark_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_portal_v1_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_portal_v1_benchmark_proto_goTypes = []any{ - (*GetBenchmarkJobRequest)(nil), // 0: portal.v1.GetBenchmarkJobRequest - (*GetBenchmarkJobResponse)(nil), // 1: portal.v1.GetBenchmarkJobResponse - (*SendBenchmarkResultRequest)(nil), // 2: portal.v1.SendBenchmarkResultRequest - (*SendBenchmarkResultResponse)(nil), // 3: portal.v1.SendBenchmarkResultResponse - (*PostJobFinishedRequest)(nil), // 4: portal.v1.PostJobFinishedRequest - (*PostJobFinishedResponse)(nil), // 5: portal.v1.PostJobFinishedResponse - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (BenchmarkResult)(0), // 0: portal.v1.BenchmarkResult + (*GetBenchmarkJobRequest)(nil), // 1: portal.v1.GetBenchmarkJobRequest + (*GetBenchmarkJobResponse)(nil), // 2: portal.v1.GetBenchmarkJobResponse + (*SendBenchmarkProgressRequest)(nil), // 3: portal.v1.SendBenchmarkProgressRequest + (*SendBenchmarkProgressResponse)(nil), // 4: portal.v1.SendBenchmarkProgressResponse + (*PostJobFinishedRequest)(nil), // 5: portal.v1.PostJobFinishedRequest + (*PostJobFinishedResponse)(nil), // 6: portal.v1.PostJobFinishedResponse + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp } var file_portal_v1_benchmark_proto_depIdxs = []int32{ - 6, // 0: portal.v1.SendBenchmarkResultRequest.started_at:type_name -> google.protobuf.Timestamp - 6, // 1: portal.v1.PostJobFinishedRequest.finished_at:type_name -> google.protobuf.Timestamp - 0, // 2: portal.v1.BenchmarkService.GetBenchmarkJob:input_type -> portal.v1.GetBenchmarkJobRequest - 2, // 3: portal.v1.BenchmarkService.SendBenchmarkResult:input_type -> portal.v1.SendBenchmarkResultRequest - 4, // 4: portal.v1.BenchmarkService.PostJobFinished:input_type -> portal.v1.PostJobFinishedRequest - 1, // 5: portal.v1.BenchmarkService.GetBenchmarkJob:output_type -> portal.v1.GetBenchmarkJobResponse - 3, // 6: portal.v1.BenchmarkService.SendBenchmarkResult:output_type -> portal.v1.SendBenchmarkResultResponse - 5, // 7: portal.v1.BenchmarkService.PostJobFinished:output_type -> portal.v1.PostJobFinishedResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 7, // 0: portal.v1.SendBenchmarkProgressRequest.started_at:type_name -> google.protobuf.Timestamp + 0, // 1: portal.v1.PostJobFinishedRequest.result:type_name -> portal.v1.BenchmarkResult + 7, // 2: portal.v1.PostJobFinishedRequest.finished_at:type_name -> google.protobuf.Timestamp + 1, // 3: portal.v1.BenchmarkService.GetBenchmarkJob:input_type -> portal.v1.GetBenchmarkJobRequest + 3, // 4: portal.v1.BenchmarkService.SendBenchmarkProgress:input_type -> portal.v1.SendBenchmarkProgressRequest + 5, // 5: portal.v1.BenchmarkService.PostJobFinished:input_type -> portal.v1.PostJobFinishedRequest + 2, // 6: portal.v1.BenchmarkService.GetBenchmarkJob:output_type -> portal.v1.GetBenchmarkJobResponse + 4, // 7: portal.v1.BenchmarkService.SendBenchmarkProgress:output_type -> portal.v1.SendBenchmarkProgressResponse + 6, // 8: portal.v1.BenchmarkService.PostJobFinished:output_type -> portal.v1.PostJobFinishedResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_portal_v1_benchmark_proto_init() } @@ -430,13 +506,14 @@ func file_portal_v1_benchmark_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_portal_v1_benchmark_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, GoTypes: file_portal_v1_benchmark_proto_goTypes, DependencyIndexes: file_portal_v1_benchmark_proto_depIdxs, + EnumInfos: file_portal_v1_benchmark_proto_enumTypes, MessageInfos: file_portal_v1_benchmark_proto_msgTypes, }.Build() File_portal_v1_benchmark_proto = out.File diff --git a/gen/portal/v1/benchmark_grpc.pb.go b/gen/portal/v1/benchmark_grpc.pb.go index d4b46bd..86b8a5c 100644 --- a/gen/portal/v1/benchmark_grpc.pb.go +++ b/gen/portal/v1/benchmark_grpc.pb.go @@ -19,9 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - BenchmarkService_GetBenchmarkJob_FullMethodName = "/portal.v1.BenchmarkService/GetBenchmarkJob" - BenchmarkService_SendBenchmarkResult_FullMethodName = "/portal.v1.BenchmarkService/SendBenchmarkResult" - BenchmarkService_PostJobFinished_FullMethodName = "/portal.v1.BenchmarkService/PostJobFinished" + BenchmarkService_GetBenchmarkJob_FullMethodName = "/portal.v1.BenchmarkService/GetBenchmarkJob" + BenchmarkService_SendBenchmarkProgress_FullMethodName = "/portal.v1.BenchmarkService/SendBenchmarkProgress" + BenchmarkService_PostJobFinished_FullMethodName = "/portal.v1.BenchmarkService/PostJobFinished" ) // BenchmarkServiceClient is the client API for BenchmarkService service. @@ -29,7 +29,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BenchmarkServiceClient interface { GetBenchmarkJob(ctx context.Context, in *GetBenchmarkJobRequest, opts ...grpc.CallOption) (*GetBenchmarkJobResponse, error) - SendBenchmarkResult(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse], error) + SendBenchmarkProgress(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse], error) PostJobFinished(ctx context.Context, in *PostJobFinishedRequest, opts ...grpc.CallOption) (*PostJobFinishedResponse, error) } @@ -51,18 +51,18 @@ func (c *benchmarkServiceClient) GetBenchmarkJob(ctx context.Context, in *GetBen return out, nil } -func (c *benchmarkServiceClient) SendBenchmarkResult(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse], error) { +func (c *benchmarkServiceClient) SendBenchmarkProgress(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[0], BenchmarkService_SendBenchmarkResult_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[0], BenchmarkService_SendBenchmarkProgress_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[SendBenchmarkResultRequest, SendBenchmarkResultResponse]{ClientStream: stream} + x := &grpc.GenericClientStream[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse]{ClientStream: stream} return x, nil } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BenchmarkService_SendBenchmarkResultClient = grpc.ClientStreamingClient[SendBenchmarkResultRequest, SendBenchmarkResultResponse] +type BenchmarkService_SendBenchmarkProgressClient = grpc.ClientStreamingClient[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse] func (c *benchmarkServiceClient) PostJobFinished(ctx context.Context, in *PostJobFinishedRequest, opts ...grpc.CallOption) (*PostJobFinishedResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -79,7 +79,7 @@ func (c *benchmarkServiceClient) PostJobFinished(ctx context.Context, in *PostJo // for forward compatibility. type BenchmarkServiceServer interface { GetBenchmarkJob(context.Context, *GetBenchmarkJobRequest) (*GetBenchmarkJobResponse, error) - SendBenchmarkResult(grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse]) error + SendBenchmarkProgress(grpc.ClientStreamingServer[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse]) error PostJobFinished(context.Context, *PostJobFinishedRequest) (*PostJobFinishedResponse, error) mustEmbedUnimplementedBenchmarkServiceServer() } @@ -94,8 +94,8 @@ type UnimplementedBenchmarkServiceServer struct{} func (UnimplementedBenchmarkServiceServer) GetBenchmarkJob(context.Context, *GetBenchmarkJobRequest) (*GetBenchmarkJobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBenchmarkJob not implemented") } -func (UnimplementedBenchmarkServiceServer) SendBenchmarkResult(grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse]) error { - return status.Errorf(codes.Unimplemented, "method SendBenchmarkResult not implemented") +func (UnimplementedBenchmarkServiceServer) SendBenchmarkProgress(grpc.ClientStreamingServer[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse]) error { + return status.Errorf(codes.Unimplemented, "method SendBenchmarkProgress not implemented") } func (UnimplementedBenchmarkServiceServer) PostJobFinished(context.Context, *PostJobFinishedRequest) (*PostJobFinishedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PostJobFinished not implemented") @@ -139,12 +139,12 @@ func _BenchmarkService_GetBenchmarkJob_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } -func _BenchmarkService_SendBenchmarkResult_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(BenchmarkServiceServer).SendBenchmarkResult(&grpc.GenericServerStream[SendBenchmarkResultRequest, SendBenchmarkResultResponse]{ServerStream: stream}) +func _BenchmarkService_SendBenchmarkProgress_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(BenchmarkServiceServer).SendBenchmarkProgress(&grpc.GenericServerStream[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BenchmarkService_SendBenchmarkResultServer = grpc.ClientStreamingServer[SendBenchmarkResultRequest, SendBenchmarkResultResponse] +type BenchmarkService_SendBenchmarkProgressServer = grpc.ClientStreamingServer[SendBenchmarkProgressRequest, SendBenchmarkProgressResponse] func _BenchmarkService_PostJobFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PostJobFinishedRequest) @@ -182,8 +182,8 @@ var BenchmarkService_ServiceDesc = grpc.ServiceDesc{ }, Streams: []grpc.StreamDesc{ { - StreamName: "SendBenchmarkResult", - Handler: _BenchmarkService_SendBenchmarkResult_Handler, + StreamName: "SendBenchmarkProgress", + Handler: _BenchmarkService_SendBenchmarkProgress_Handler, ClientStreams: true, }, }, diff --git a/proto/portal/v1/benchmark.proto b/proto/portal/v1/benchmark.proto index 8a90bf8..4cf2f6b 100644 --- a/proto/portal/v1/benchmark.proto +++ b/proto/portal/v1/benchmark.proto @@ -11,7 +11,7 @@ message GetBenchmarkJobResponse { bool exist = 2; } -message SendBenchmarkResultRequest { +message SendBenchmarkProgressRequest { string benchmark_id = 1; google.protobuf.Timestamp started_at = 2; string stdout = 3; // stdout, stderrどちらも、実行中でも全てのログを送る @@ -19,17 +19,25 @@ message SendBenchmarkResultRequest { int64 score = 5; } -message SendBenchmarkResultResponse {} +message SendBenchmarkProgressResponse {} + +enum BenchmarkResult { + BENCHMARK_RESULT_UNSPECIFIED = 0; + BENCHMARK_RESULT_PASSED = 1; + BENCHMARK_RESULT_FAILED = 2; + BENCHMARK_RESULT_ERROR = 3; +} message PostJobFinishedRequest { string benchmark_id = 1; - google.protobuf.Timestamp finished_at = 2; + BenchmarkResult result = 2; + google.protobuf.Timestamp finished_at = 3; } message PostJobFinishedResponse {} service BenchmarkService { rpc GetBenchmarkJob(GetBenchmarkJobRequest) returns (GetBenchmarkJobResponse); - rpc SendBenchmarkResult(stream SendBenchmarkResultRequest) returns (SendBenchmarkResultResponse); + rpc SendBenchmarkProgress(stream SendBenchmarkProgressRequest) returns (SendBenchmarkProgressResponse); rpc PostJobFinished(PostJobFinishedRequest) returns (PostJobFinishedResponse); } From 01937137333dba13b2ab5cb76ac6f91e7cab673b Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:19:09 +0900 Subject: [PATCH 05/11] =?UTF-8?q?:memo:=20proto=E3=81=AE=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=E3=81=A8Lint=E3=82=92?= =?UTF-8?q?=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AB?= =?UTF-8?q?=E8=A8=98=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proto/README.md b/proto/README.md index a24b3cc..f3e7ba8 100644 --- a/proto/README.md +++ b/proto/README.md @@ -19,6 +19,10 @@ task proto:gen buf generate ``` +## フォーマット・Lint + +`buf`を使用する。 + ## 処理の流れ 1. runnerがポータルにベンチマーカーキューの先頭を問い合わせる。ポータルは先頭のベンチマークIDを返す。(`GetBenchmarkJob`) From 2d6f0f068d0456c985b18bc6b7c88a4838c8c0a5 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:23:22 +0900 Subject: [PATCH 06/11] =?UTF-8?q?:wrench:=20buf.gen.yaml=E3=81=AE=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buf.gen.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 3096f01..870ddda 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -4,10 +4,6 @@ managed: override: - file_option: go_package_prefix value: github.com/traPtitech/piscon-portal-v2/proto/gen - # Remove `disable` field if googleapis is not used - disable: - - module: buf.build/googleapis/googleapis - file_option: go_package_prefix plugins: - remote: buf.build/grpc/go:v1.5.1 out: gen From e5ff213948d0d75d013b0fff6efc09fa8f8da0b0 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:39:30 +0900 Subject: [PATCH 07/11] =?UTF-8?q?:wrench:=20protobuf=E7=94=A8=E3=81=AECI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/proto-ci.yml | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/proto-ci.yml diff --git a/.github/workflows/proto-ci.yml b/.github/workflows/proto-ci.yml new file mode 100644 index 0000000..89823be --- /dev/null +++ b/.github/workflows/proto-ci.yml @@ -0,0 +1,48 @@ +name: Protobuf CI + +on: + push: + branches: + - main + paths: + - "proto/**" + pull_request: + paths: + - "proto/**" + +jobs: + buf: + name: buf check + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-action@v1 + with: + version: v1.49.0 + push: false + + buf-gen: + name: buf generate + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-action@v1 + with: + version: v1.49.0 + setup_only: true + + - name: Generate + run: buf generate + shell: bash + + - name: Exit if diff exists + run: | + if [[ -n $(git status --porcelain) ]]; then + echo "Generated files are different from committed files. Please run 'buf generate' and commit the changes." + exit 1 + fi + shell: bash From 3de4bd06bf962f04ba63d715bafc518599b07967 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:40:40 +0900 Subject: [PATCH 08/11] =?UTF-8?q?:bug:=20=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=AE=E6=8C=87=E5=AE=9A=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/proto-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proto-ci.yml b/.github/workflows/proto-ci.yml index 89823be..064dcf5 100644 --- a/.github/workflows/proto-ci.yml +++ b/.github/workflows/proto-ci.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: bufbuild/buf-action@v1 with: - version: v1.49.0 + version: 1.49.0 push: false buf-gen: @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 - uses: bufbuild/buf-action@v1 with: - version: v1.49.0 + version: 1.49.0 setup_only: true - name: Generate From 0b215a364ff85ea3c9be0f68f78c2f15d6b6f50b Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:13:24 +0900 Subject: [PATCH 09/11] =?UTF-8?q?:adhesive=5Fbandage:=20=E3=83=99=E3=83=B3?= =?UTF-8?q?=E3=83=81=E3=83=9E=E3=83=BC=E3=82=AF=E3=82=92=E5=AE=9F=E8=A1=8C?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=AE=E3=81=AB=E5=BF=85=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=82=92=E5=90=AB=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/portal/v1/benchmark.pb.go | 297 +++++++++++++++++++------------- proto/portal/v1/benchmark.proto | 8 +- 2 files changed, 180 insertions(+), 125 deletions(-) diff --git a/gen/portal/v1/benchmark.pb.go b/gen/portal/v1/benchmark.pb.go index 76879e0..cb2be34 100644 --- a/gen/portal/v1/benchmark.pb.go +++ b/gen/portal/v1/benchmark.pb.go @@ -109,17 +109,68 @@ func (*GetBenchmarkJobRequest) Descriptor() ([]byte, []int) { return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{0} } +type BenchmarkJob struct { + state protoimpl.MessageState `protogen:"open.v1"` + BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` + TargetUrl string `protobuf:"bytes,2,opt,name=target_url,json=targetUrl,proto3" json:"target_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BenchmarkJob) Reset() { + *x = BenchmarkJob{} + mi := &file_portal_v1_benchmark_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BenchmarkJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BenchmarkJob) ProtoMessage() {} + +func (x *BenchmarkJob) ProtoReflect() protoreflect.Message { + mi := &file_portal_v1_benchmark_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BenchmarkJob.ProtoReflect.Descriptor instead. +func (*BenchmarkJob) Descriptor() ([]byte, []int) { + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{1} +} + +func (x *BenchmarkJob) GetBenchmarkId() string { + if x != nil { + return x.BenchmarkId + } + return "" +} + +func (x *BenchmarkJob) GetTargetUrl() string { + if x != nil { + return x.TargetUrl + } + return "" +} + type GetBenchmarkJobResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - BenchmarkId *string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3,oneof" json:"benchmark_id,omitempty"` - Exist bool `protobuf:"varint,2,opt,name=exist,proto3" json:"exist,omitempty"` + BenchmarkJob *BenchmarkJob `protobuf:"bytes,1,opt,name=benchmark_job,json=benchmarkJob,proto3,oneof" json:"benchmark_job,omitempty"` // まだジョブがない場合はnull unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetBenchmarkJobResponse) Reset() { *x = GetBenchmarkJobResponse{} - mi := &file_portal_v1_benchmark_proto_msgTypes[1] + mi := &file_portal_v1_benchmark_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -131,7 +182,7 @@ func (x *GetBenchmarkJobResponse) String() string { func (*GetBenchmarkJobResponse) ProtoMessage() {} func (x *GetBenchmarkJobResponse) ProtoReflect() protoreflect.Message { - mi := &file_portal_v1_benchmark_proto_msgTypes[1] + mi := &file_portal_v1_benchmark_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -144,21 +195,14 @@ func (x *GetBenchmarkJobResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBenchmarkJobResponse.ProtoReflect.Descriptor instead. func (*GetBenchmarkJobResponse) Descriptor() ([]byte, []int) { - return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{1} -} - -func (x *GetBenchmarkJobResponse) GetBenchmarkId() string { - if x != nil && x.BenchmarkId != nil { - return *x.BenchmarkId - } - return "" + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{2} } -func (x *GetBenchmarkJobResponse) GetExist() bool { +func (x *GetBenchmarkJobResponse) GetBenchmarkJob() *BenchmarkJob { if x != nil { - return x.Exist + return x.BenchmarkJob } - return false + return nil } type SendBenchmarkProgressRequest struct { @@ -174,7 +218,7 @@ type SendBenchmarkProgressRequest struct { func (x *SendBenchmarkProgressRequest) Reset() { *x = SendBenchmarkProgressRequest{} - mi := &file_portal_v1_benchmark_proto_msgTypes[2] + mi := &file_portal_v1_benchmark_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +230,7 @@ func (x *SendBenchmarkProgressRequest) String() string { func (*SendBenchmarkProgressRequest) ProtoMessage() {} func (x *SendBenchmarkProgressRequest) ProtoReflect() protoreflect.Message { - mi := &file_portal_v1_benchmark_proto_msgTypes[2] + mi := &file_portal_v1_benchmark_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +243,7 @@ func (x *SendBenchmarkProgressRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendBenchmarkProgressRequest.ProtoReflect.Descriptor instead. func (*SendBenchmarkProgressRequest) Descriptor() ([]byte, []int) { - return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{2} + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{3} } func (x *SendBenchmarkProgressRequest) GetBenchmarkId() string { @@ -245,7 +289,7 @@ type SendBenchmarkProgressResponse struct { func (x *SendBenchmarkProgressResponse) Reset() { *x = SendBenchmarkProgressResponse{} - mi := &file_portal_v1_benchmark_proto_msgTypes[3] + mi := &file_portal_v1_benchmark_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -257,7 +301,7 @@ func (x *SendBenchmarkProgressResponse) String() string { func (*SendBenchmarkProgressResponse) ProtoMessage() {} func (x *SendBenchmarkProgressResponse) ProtoReflect() protoreflect.Message { - mi := &file_portal_v1_benchmark_proto_msgTypes[3] + mi := &file_portal_v1_benchmark_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -270,7 +314,7 @@ func (x *SendBenchmarkProgressResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendBenchmarkProgressResponse.ProtoReflect.Descriptor instead. func (*SendBenchmarkProgressResponse) Descriptor() ([]byte, []int) { - return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{3} + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{4} } type PostJobFinishedRequest struct { @@ -284,7 +328,7 @@ type PostJobFinishedRequest struct { func (x *PostJobFinishedRequest) Reset() { *x = PostJobFinishedRequest{} - mi := &file_portal_v1_benchmark_proto_msgTypes[4] + mi := &file_portal_v1_benchmark_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -296,7 +340,7 @@ func (x *PostJobFinishedRequest) String() string { func (*PostJobFinishedRequest) ProtoMessage() {} func (x *PostJobFinishedRequest) ProtoReflect() protoreflect.Message { - mi := &file_portal_v1_benchmark_proto_msgTypes[4] + mi := &file_portal_v1_benchmark_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -309,7 +353,7 @@ func (x *PostJobFinishedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostJobFinishedRequest.ProtoReflect.Descriptor instead. func (*PostJobFinishedRequest) Descriptor() ([]byte, []int) { - return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{4} + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{5} } func (x *PostJobFinishedRequest) GetBenchmarkId() string { @@ -341,7 +385,7 @@ type PostJobFinishedResponse struct { func (x *PostJobFinishedResponse) Reset() { *x = PostJobFinishedResponse{} - mi := &file_portal_v1_benchmark_proto_msgTypes[5] + mi := &file_portal_v1_benchmark_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -353,7 +397,7 @@ func (x *PostJobFinishedResponse) String() string { func (*PostJobFinishedResponse) ProtoMessage() {} func (x *PostJobFinishedResponse) ProtoReflect() protoreflect.Message { - mi := &file_portal_v1_benchmark_proto_msgTypes[5] + mi := &file_portal_v1_benchmark_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -366,7 +410,7 @@ func (x *PostJobFinishedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PostJobFinishedResponse.ProtoReflect.Descriptor instead. func (*PostJobFinishedResponse) Descriptor() ([]byte, []int) { - return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{5} + return file_portal_v1_benchmark_proto_rawDescGZIP(), []int{6} } var File_portal_v1_benchmark_proto protoreflect.FileDescriptor @@ -378,80 +422,85 @@ var file_portal_v1_benchmark_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x68, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, - 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0c, - 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x69, 0x73, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x62, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x1c, - 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, - 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x64, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, - 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, - 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, - 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1a, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x6e, 0x63, - 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, - 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x89, 0x01, 0x0a, 0x0f, - 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x20, 0x0a, 0x1c, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, - 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, - 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, - 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, - 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0xb4, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, - 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, - 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, - 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x27, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x74, 0x22, 0x50, 0x0a, 0x0c, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, + 0x62, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x55, 0x72, 0x6c, 0x22, 0x6e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x6a, 0x6f, 0x62, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x48, 0x00, + 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x88, 0x01, + 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, + 0x6a, 0x6f, 0x62, 0x22, 0xc2, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, + 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, - 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, - 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, - 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, - 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x70, 0x69, 0x73, 0x63, 0x6f, 0x6e, - 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x70, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, - 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, - 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x50, 0x6f, + 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2a, 0x89, 0x01, 0x0a, 0x0f, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x45, 0x4e, 0x43, 0x48, + 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, + 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x41, + 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, + 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, + 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, + 0xb4, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, + 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, + 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, + 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, + 0x68, 0x2f, 0x70, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, + 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -467,32 +516,34 @@ func file_portal_v1_benchmark_proto_rawDescGZIP() []byte { } var file_portal_v1_benchmark_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_portal_v1_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_portal_v1_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_portal_v1_benchmark_proto_goTypes = []any{ (BenchmarkResult)(0), // 0: portal.v1.BenchmarkResult (*GetBenchmarkJobRequest)(nil), // 1: portal.v1.GetBenchmarkJobRequest - (*GetBenchmarkJobResponse)(nil), // 2: portal.v1.GetBenchmarkJobResponse - (*SendBenchmarkProgressRequest)(nil), // 3: portal.v1.SendBenchmarkProgressRequest - (*SendBenchmarkProgressResponse)(nil), // 4: portal.v1.SendBenchmarkProgressResponse - (*PostJobFinishedRequest)(nil), // 5: portal.v1.PostJobFinishedRequest - (*PostJobFinishedResponse)(nil), // 6: portal.v1.PostJobFinishedResponse - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*BenchmarkJob)(nil), // 2: portal.v1.BenchmarkJob + (*GetBenchmarkJobResponse)(nil), // 3: portal.v1.GetBenchmarkJobResponse + (*SendBenchmarkProgressRequest)(nil), // 4: portal.v1.SendBenchmarkProgressRequest + (*SendBenchmarkProgressResponse)(nil), // 5: portal.v1.SendBenchmarkProgressResponse + (*PostJobFinishedRequest)(nil), // 6: portal.v1.PostJobFinishedRequest + (*PostJobFinishedResponse)(nil), // 7: portal.v1.PostJobFinishedResponse + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp } var file_portal_v1_benchmark_proto_depIdxs = []int32{ - 7, // 0: portal.v1.SendBenchmarkProgressRequest.started_at:type_name -> google.protobuf.Timestamp - 0, // 1: portal.v1.PostJobFinishedRequest.result:type_name -> portal.v1.BenchmarkResult - 7, // 2: portal.v1.PostJobFinishedRequest.finished_at:type_name -> google.protobuf.Timestamp - 1, // 3: portal.v1.BenchmarkService.GetBenchmarkJob:input_type -> portal.v1.GetBenchmarkJobRequest - 3, // 4: portal.v1.BenchmarkService.SendBenchmarkProgress:input_type -> portal.v1.SendBenchmarkProgressRequest - 5, // 5: portal.v1.BenchmarkService.PostJobFinished:input_type -> portal.v1.PostJobFinishedRequest - 2, // 6: portal.v1.BenchmarkService.GetBenchmarkJob:output_type -> portal.v1.GetBenchmarkJobResponse - 4, // 7: portal.v1.BenchmarkService.SendBenchmarkProgress:output_type -> portal.v1.SendBenchmarkProgressResponse - 6, // 8: portal.v1.BenchmarkService.PostJobFinished:output_type -> portal.v1.PostJobFinishedResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: portal.v1.GetBenchmarkJobResponse.benchmark_job:type_name -> portal.v1.BenchmarkJob + 8, // 1: portal.v1.SendBenchmarkProgressRequest.started_at:type_name -> google.protobuf.Timestamp + 0, // 2: portal.v1.PostJobFinishedRequest.result:type_name -> portal.v1.BenchmarkResult + 8, // 3: portal.v1.PostJobFinishedRequest.finished_at:type_name -> google.protobuf.Timestamp + 1, // 4: portal.v1.BenchmarkService.GetBenchmarkJob:input_type -> portal.v1.GetBenchmarkJobRequest + 4, // 5: portal.v1.BenchmarkService.SendBenchmarkProgress:input_type -> portal.v1.SendBenchmarkProgressRequest + 6, // 6: portal.v1.BenchmarkService.PostJobFinished:input_type -> portal.v1.PostJobFinishedRequest + 3, // 7: portal.v1.BenchmarkService.GetBenchmarkJob:output_type -> portal.v1.GetBenchmarkJobResponse + 5, // 8: portal.v1.BenchmarkService.SendBenchmarkProgress:output_type -> portal.v1.SendBenchmarkProgressResponse + 7, // 9: portal.v1.BenchmarkService.PostJobFinished:output_type -> portal.v1.PostJobFinishedResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_portal_v1_benchmark_proto_init() } @@ -500,14 +551,14 @@ func file_portal_v1_benchmark_proto_init() { if File_portal_v1_benchmark_proto != nil { return } - file_portal_v1_benchmark_proto_msgTypes[1].OneofWrappers = []any{} + file_portal_v1_benchmark_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_portal_v1_benchmark_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/portal/v1/benchmark.proto b/proto/portal/v1/benchmark.proto index 4cf2f6b..ff7da69 100644 --- a/proto/portal/v1/benchmark.proto +++ b/proto/portal/v1/benchmark.proto @@ -6,9 +6,13 @@ import "google/protobuf/timestamp.proto"; message GetBenchmarkJobRequest {} +message BenchmarkJob { + string benchmark_id = 1; + string target_url = 2; +} + message GetBenchmarkJobResponse { - optional string benchmark_id = 1; - bool exist = 2; + optional BenchmarkJob benchmark_job = 1; // まだジョブがない場合はnull } message SendBenchmarkProgressRequest { From 1ce550b03f675413e81d27cf93e431f9cf5fec1b Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:16:41 +0900 Subject: [PATCH 10/11] =?UTF-8?q?:adhesive=5Fbandage:=20runner=E5=86=85?= =?UTF-8?q?=E9=83=A8=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E9=80=81=E4=BF=A1=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/portal/v1/benchmark.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/proto/portal/v1/benchmark.proto b/proto/portal/v1/benchmark.proto index ff7da69..1d5c8ce 100644 --- a/proto/portal/v1/benchmark.proto +++ b/proto/portal/v1/benchmark.proto @@ -36,6 +36,7 @@ message PostJobFinishedRequest { string benchmark_id = 1; BenchmarkResult result = 2; google.protobuf.Timestamp finished_at = 3; + string runner_error = 4; // runner内部のエラーメッセージ } message PostJobFinishedResponse {} From 0ecfacb35f2da3419f34f2efd1078b395473a72f Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:20:08 +0900 Subject: [PATCH 11/11] =?UTF-8?q?:adhesive=5Fbandage:=20generate=E3=82=8F?= =?UTF-8?q?=E3=81=99=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen/portal/v1/benchmark.pb.go | 92 +++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/gen/portal/v1/benchmark.pb.go b/gen/portal/v1/benchmark.pb.go index cb2be34..10c1931 100644 --- a/gen/portal/v1/benchmark.pb.go +++ b/gen/portal/v1/benchmark.pb.go @@ -322,6 +322,7 @@ type PostJobFinishedRequest struct { BenchmarkId string `protobuf:"bytes,1,opt,name=benchmark_id,json=benchmarkId,proto3" json:"benchmark_id,omitempty"` Result BenchmarkResult `protobuf:"varint,2,opt,name=result,proto3,enum=portal.v1.BenchmarkResult" json:"result,omitempty"` FinishedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + RunnerError string `protobuf:"bytes,4,opt,name=runner_error,json=runnerError,proto3" json:"runner_error,omitempty"` // runner内部のエラーメッセージ unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -377,6 +378,13 @@ func (x *PostJobFinishedRequest) GetFinishedAt() *timestamppb.Timestamp { return nil } +func (x *PostJobFinishedRequest) GetRunnerError() string { + if x != nil { + return x.RunnerError + } + return "" +} + type PostJobFinishedResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -448,7 +456,7 @@ var file_portal_v1_benchmark_proto_rawDesc = []byte{ 0x72, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x50, 0x6f, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x65, 0x6e, 0x63, @@ -459,48 +467,50 @@ var file_portal_v1_benchmark_proto_rawDesc = []byte{ 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2a, 0x89, 0x01, 0x0a, 0x0f, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, - 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x45, 0x4e, 0x43, 0x48, - 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, - 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x41, - 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, - 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, - 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, - 0xb4, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, - 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x50, + 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x89, 0x01, 0x0a, 0x0f, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x45, + 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, + 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, + 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x45, 0x4e, + 0x43, 0x48, 0x4d, 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x45, 0x4e, 0x43, 0x48, 0x4d, + 0x41, 0x52, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x03, 0x32, 0xb4, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, - 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, - 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, - 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x58, 0x0a, 0x0f, - 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, - 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6c, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, + 0x58, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, + 0x65, 0x64, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x70, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, - 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x50, 0x74, 0x69, 0x74, 0x65, 0x63, - 0x68, 0x2f, 0x70, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2d, - 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6f, 0x72, - 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, - 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x0d, 0x63, 0x6f, + 0x6d, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x50, 0x74, 0x69, + 0x74, 0x65, 0x63, 0x68, 0x2f, 0x70, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x6c, 0x2d, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x15, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x61, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (