Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15](backport #40081) [debugPrintProcessor]: exit directly when log doesn't have debug level enabled #40124

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 5, 2024

Proposed commit message

This PR is the aftermath of profiling the netflow integration test of this PR (PS: the pcap I used as input is ~25MB thus I won't include it in beats repo)

So this is the cpu profile flamegraph before the commit of this PR

Screenshot 2024-07-02 at 10 38 54 PM

As we can see debugPrintProcessor is invoked and we pay the "performance" price of encoding every event in json even when our log isn't set up with DEBUG level.

The respective cpu profile flamegraph after this PR with debugPrintProcessor still being there but exiting directly when log DEBUG is not enabled

Screenshot 2024-07-02 at 10 42 16 PM

Extracting the average EPS of the aformentioned netflow integration tested on my local macbook with a local ES inside a container

Before this PR With this PR
18490 33760

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

N/A

Author's Checklist

N/A

How to test this PR locally

Help get this PR merged or clone it and apply this small commit there 🙂

cd x-pack/filebeat
mage docker:composeUp

run go profiler against TestNetFlowIntegration

Related issues

Use cases

N/A

Screenshots

Look at description

Logs

N/A


This is an automatic backport of pull request #40081 done by Mergify.

@mergify mergify bot requested a review from a team as a code owner July 5, 2024 15:39
@mergify mergify bot added the backport label Jul 5, 2024
@mergify mergify bot requested review from faec and leehinman and removed request for a team July 5, 2024 15:39
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 5, 2024
@botelastic
Copy link

botelastic bot commented Jul 5, 2024

This pull request doesn't have a Team:<team> label.

@cmacknz cmacknz merged commit 6e97683 into 8.15 Jul 5, 2024
121 checks passed
@cmacknz cmacknz deleted the mergify/bp/8.15/pr-40081 branch July 5, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants