Skip to content

Commit

Permalink
🐛 Fix build error and add comment
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi committed Apr 16, 2024
1 parent 3e81caa commit d5b29bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/tools/benchmark/job/usecase/benchmarkd.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ func New(cfg *config.Config) (r runner.Runner, err error) {
if err != nil {
return nil, err

Check warning on line 76 in pkg/tools/benchmark/job/usecase/benchmarkd.go

View check run for this annotation

Codecov / codecov/patch

pkg/tools/benchmark/job/usecase/benchmarkd.go#L68-L76

Added lines #L68 - L76 were not covered by tests
}
clientInterceptors = append(clientInterceptors, "metric"}
// Add interceptors regardless of whether it is set in config.
// Because it is the benchmark job and requires metrics for measure benchmark result.
clientInterceptors = append(clientInterceptors, "metric")
if cfg.Observability.Trace.Enabled {
clientInterceptors = append(clientInterceptors, "trace"}
clientInterceptors = append(clientInterceptors, "trace")

Check warning on line 82 in pkg/tools/benchmark/job/usecase/benchmarkd.go

View check run for this annotation

Codecov / codecov/patch

pkg/tools/benchmark/job/usecase/benchmarkd.go#L80-L82

Added lines #L80 - L82 were not covered by tests
}
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/tools/benchmark/operator/service/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ type scenario struct {
const (
Scenario = "scenario"
ScenarioKind = "ValdBenchmarkScenario"
Name = "name"
ServerName = "vald-benchmark-job"
BenchmarkName = "benchmark-name"
BeforeJobName = "before-job-name"
BeforeJobNamespace = "before-job-namespace"
Expand Down Expand Up @@ -472,6 +474,7 @@ func (o *operator) createBenchmarkJob(ctx context.Context, scenario v1.ValdBench
// createJob creates benchmark job from benchmark job resource.
func (o *operator) createJob(ctx context.Context, bjr v1.ValdBenchmarkJob) error {
label := map[string]string{
Name: ServerName,
BenchmarkName: bjr.GetName() + strconv.Itoa(int(bjr.GetGeneration())),
}
job, err := benchjob.NewBenchmarkJob(
Expand Down

0 comments on commit d5b29bd

Please sign in to comment.