Skip to content

Commit

Permalink
Use memory size flag to activate dyn queue size feature (#2059)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling authored Feb 7, 2020
1 parent c29449a commit 29e7131
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/collector/app/span_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func newSpanProcessor(spanWriter spanstore.Writer, opts ...Option) *spanProcesso
}

processSpanFuncs := []ProcessSpan{options.preSave, sp.saveSpan}
if options.dynQueueSizeWarmup > 0 {
if options.dynQueueSizeMemory > 0 {
// add to processSpanFuncs
options.logger.Info("Dynamically adjusting the queue size at runtime.",
zap.Uint("memory-mib", options.dynQueueSizeMemory/1024/1024),
Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/app/span_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func TestSpanProcessorCountSpan(t *testing.T) {
m := mb.Namespace(metrics.NSOptions{})

w := &fakeSpanWriter{}
p := NewSpanProcessor(w, Options.HostMetrics(m), Options.DynQueueSizeWarmup(1000)).(*spanProcessor)
p := NewSpanProcessor(w, Options.HostMetrics(m), Options.DynQueueSizeMemory(1000)).(*spanProcessor)
p.background(10*time.Millisecond, p.updateGauges)
defer p.Stop()

Expand Down

0 comments on commit 29e7131

Please sign in to comment.