Skip to content

Commit

Permalink
💚 Add info tag for info metrics
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi committed Mar 4, 2024
1 parent 9d67212 commit 1cd1add
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/config/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ func (b *BenchmarkScenario) Bind() *BenchmarkScenario {

// BenchmarkJobImageInfo represents the docker image information for benchmark job.
type BenchmarkJobImageInfo struct {
Image string `json:"image,omitempty" yaml:"image"`
PullPolicy string `json:"pull_policy,omitempty" yaml:"pull_policy"`
Image string `info:"image" json:"image,omitempty" yaml:"image"`
PullPolicy string `info:"pull_policy" json:"pull_policy,omitempty" yaml:"pull_policy"`
}

// Bind binds the actual data from the BenchmarkJobImageInfo receiver fields.
Expand Down
2 changes: 0 additions & 2 deletions pkg/tools/benchmark/operator/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package config

import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/log"
)

// GlobalConfig is type alias for config.GlobalConfig.
Expand Down Expand Up @@ -64,7 +63,6 @@ func NewConfig(path string) (cfg *Config, err error) {
} else {
cfg.JobImage = new(config.BenchmarkJobImageInfo)
}
log.Error(cfg)
return cfg, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/tools/benchmark/operator/usecase/benchmarkd.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func New(cfg *config.Config) (r runner.Runner, err error) {
if cfg.Observability.Enabled {
obs, err = observability.NewWithConfig(
cfg.Observability,
infometrics.New("benchmark_operator_info", "Benchmark Operator Info", *cfg.JobImage),
infometrics.New("benchmark_operator_info", "Benchmark Operator info", *cfg.JobImage),
backoffmetrics.New(),

Check warning on line 100 in pkg/tools/benchmark/operator/usecase/benchmarkd.go

View check run for this annotation

Codecov / codecov/patch

pkg/tools/benchmark/operator/usecase/benchmarkd.go#L99-L100

Added lines #L99 - L100 were not covered by tests
)
if err != nil {
Expand Down

0 comments on commit 1cd1add

Please sign in to comment.