@@ -50,11 +50,11 @@ type Worker struct {
50
50
}
51
51
52
52
type Config struct {
53
- JobConcurrency int `yaml:"job_capacity"`
54
- JobPollInterval time.Duration `yaml:"job_poll_interval"`
55
- SmallObjectSize int `yaml:"small_object_size_bytes"`
56
- TempDir string `yaml:"temp_dir"`
57
- RequestTimeout time.Duration `yaml:"request_timeout"`
53
+ JobConcurrency int `yaml:"job_capacity"`
54
+ JobPollInterval time.Duration `yaml:"job_poll_interval"`
55
+ SmallObjectSize int `yaml:"small_object_size_bytes"`
56
+ TempDir string `yaml:"temp_dir"`
57
+ RequestTimeout time.Duration `yaml:"request_timeout"`
58
58
MetricsExporterEnabled bool `yaml:"metrics_exporter_enabled"`
59
59
}
60
60
@@ -65,7 +65,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
65
65
f .DurationVar (& cfg .RequestTimeout , prefix + "request-timeout" , 5 * time .Second , "Job request timeout." )
66
66
f .IntVar (& cfg .SmallObjectSize , prefix + "small-object-size-bytes" , 8 << 20 , "Size of the object that can be loaded in memory." )
67
67
f .StringVar (& cfg .TempDir , prefix + "temp-dir" , os .TempDir (), "Temporary directory for compaction jobs." )
68
- f .BoolVar (& cfg .EnableMetricsExporter , prefix + "metrics-exporter.enabled" , false , "This parameter specifies whether the metrics exporter is enabled." )
68
+ f .BoolVar (& cfg .MetricsExporterEnabled , prefix + "metrics-exporter.enabled" , false , "This parameter specifies whether the metrics exporter is enabled." )
69
69
}
70
70
71
71
type compactionJob struct {
@@ -403,7 +403,7 @@ func (w *Worker) runCompaction(job *compactionJob) {
403
403
block .WithObjectMaxSizeLoadInMemory (w .config .SmallObjectSize ),
404
404
block .WithObjectDownload (sourcedir ),
405
405
),
406
- block .WithSampleObserver (newSampleObserver (w .config .EnableMetricsExporter , job )),
406
+ block .WithSampleObserver (newSampleObserver (w .config .MetricsExporterEnabled , job )),
407
407
)
408
408
defer func () {
409
409
if err = os .RemoveAll (tempdir ); err != nil {
0 commit comments