tetragon icon indicating copy to clipboard operation
tetragon copied to clipboard

update observe.go

Open masonlu2014 opened this issue 9 months ago • 6 comments

Description


this purpose to fix the memory leak in the tetragon daily operation

sync.Pool for bytes.Reader reuse
     Reuses bytes.Reader objects to reduce allocations and GC overhead.

Optimized perfBufferSize calculation
    Rounds buffer size to the next power of two for better memory alignment and efficiency.

sync.WaitGroup for Goroutine management
    Ensures proper synchronization and prevents memory leaks.

masonlu2014 avatar Mar 10 '25 06:03 masonlu2014

Deploy Preview for tetragon ready!

Name Link
Latest commit ba1e0bc56fc429fbbb4a2cdb3430ec4e28f252ef
Latest deploy log https://app.netlify.com/sites/tetragon/deploys/67ce8a248b09850008827b35
Deploy Preview https://deploy-preview-3486--tetragon.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 10 '25 06:03 netlify[bot]

Screenshot 2025-03-10 at 16 21 00 this is before and after apply hot-fix patch for the memory leak

masonlu2014 avatar Mar 10 '25 08:03 masonlu2014

I'm curious, did you use an LLM for this PR?

mtardy avatar Mar 10 '25 10:03 mtardy

yes, i am using LLM, btw, i will delete the empty line and resubmit a PR, would you help take a look this approach will be impact to the tetragon product , for example like daily security monitor events ?

masonlu2014 avatar Mar 11 '25 08:03 masonlu2014

i will delete the empty line and resubmit a PR

please do not do that and just force push to this PR directly

mtardy avatar Mar 11 '25 10:03 mtardy

Moving this to draft. @masonlu2014 please undraft it once you feel it's ready for review.

kkourt avatar Mar 21 '25 07:03 kkourt