Skip to content

perf(dogstatsd): optimize flush_metrics to skip processing when empty#46

Merged
litianningdatadog merged 1 commit intomainfrom
tianning.li/SVLS-7845
Oct 28, 2025
Merged

perf(dogstatsd): optimize flush_metrics to skip processing when empty#46
litianningdatadog merged 1 commit intomainfrom
tianning.li/SVLS-7845

Conversation

@litianningdatadog
Copy link
Contributor

@litianningdatadog litianningdatadog commented Oct 28, 2025

perf(dogstatsd): optimize flush_metrics to skip processing when empty

https://datadoghq.atlassian.net/browse/SVLS-7845

  • Skip expensive operations in flush_metrics() when both series and distributions are empty. Reduces unnecessary logs if no meaningful flush occurs
  • Adds unit tests proving the optimization works correctly
  • Fixed clippy warning fix.

Test:

Before After
Log image image

@litianningdatadog litianningdatadog merged commit 05b9dee into main Oct 28, 2025
27 checks passed
@litianningdatadog litianningdatadog deleted the tianning.li/SVLS-7845 branch October 28, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants