Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
alsoba13 committed Feb 7, 2025
1 parent ea9c28e commit 0a3c007
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/experiment/compactor/compaction_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ type Worker struct {
}

type Config struct {
JobConcurrency int `yaml:"job_capacity"`
JobPollInterval time.Duration `yaml:"job_poll_interval"`
SmallObjectSize int `yaml:"small_object_size_bytes"`
TempDir string `yaml:"temp_dir"`
RequestTimeout time.Duration `yaml:"request_timeout"`
JobConcurrency int `yaml:"job_capacity"`
JobPollInterval time.Duration `yaml:"job_poll_interval"`
SmallObjectSize int `yaml:"small_object_size_bytes"`
TempDir string `yaml:"temp_dir"`
RequestTimeout time.Duration `yaml:"request_timeout"`
MetricsExporterEnabled bool `yaml:"metrics_exporter_enabled"`
}

Expand All @@ -65,7 +65,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
f.DurationVar(&cfg.RequestTimeout, prefix+"request-timeout", 5*time.Second, "Job request timeout.")
f.IntVar(&cfg.SmallObjectSize, prefix+"small-object-size-bytes", 8<<20, "Size of the object that can be loaded in memory.")
f.StringVar(&cfg.TempDir, prefix+"temp-dir", os.TempDir(), "Temporary directory for compaction jobs.")
f.BoolVar(&cfg.EnableMetricsExporter, prefix+"metrics-exporter.enabled", false, "This parameter specifies whether the metrics exporter is enabled.")
f.BoolVar(&cfg.MetricsExporterEnabled, prefix+"metrics-exporter.enabled", false, "This parameter specifies whether the metrics exporter is enabled.")
}

type compactionJob struct {
Expand Down Expand Up @@ -403,7 +403,7 @@ func (w *Worker) runCompaction(job *compactionJob) {
block.WithObjectMaxSizeLoadInMemory(w.config.SmallObjectSize),
block.WithObjectDownload(sourcedir),
),
block.WithSampleObserver(newSampleObserver(w.config.EnableMetricsExporter, job)),
block.WithSampleObserver(newSampleObserver(w.config.MetricsExporterEnabled, job)),
)
defer func() {
if err = os.RemoveAll(tempdir); err != nil {
Expand Down

0 comments on commit 0a3c007

Please sign in to comment.