talks icon indicating copy to clipboard operation
talks copied to clipboard

Talk proposal: Breaking and optimizing the Prometheus parser

Open Maniktherana opened this issue 4 months ago • 5 comments

Title

Breaking and optimizing the Prometheus parser

Describe your Talk

Hi I'm Manik, Prometheus Contributor

What's covered?

  • I tried to contribute to Prometheus, but it was complex and had a lot of moving parts. It took me a month before I could open my first PR
  • Now I'm optimizing (by 250+%!) the OpenMetrics Parser (a mess I made in the first place)
  • I'll talk about how Prometheus uses Lex to eventually create a high performance parser.
  • I'll cover techniques to navigate complex codebases that helped me become a confident contributor
  • Finally I get into Benchmarking go with the stdlib & benchstat. Possibly covering load testing my work with K6 & showing off flamegraphs

Breaking into mature Go codebases

  • I've navigated large frontend codebases and rest apis with ease, but Prometheus turned out to be a different beast
  • Eventually I learned how to harness a debugger and how to find what im looking for through rigorous testing

Lex & Parsers

  • Prometheus uses Lex which is wrapped by a Parser
  • I cover how this works and why its needed
  • I go over what I worked on and why its used wayyyy too much memory and how I go about optimizing it by over 300%

Benchmarking

  • Cover microbenchmarking, macrobenchmarking and considerations for both
  • A little bit about load testing
  • All this comes together to help identify perfomance bottlenecks and eventually help you optimize your mess of a codebase

Pre-requisites & reading material

Relevant stuff I cover:

  • https://github.com/prometheus/prometheus/issues/14808
  • https://github.com/prometheus/prometheus/pull/14933
  • https://github.com/prometheus/prometheus/pull/14965
  • https://github.com/prometheus/prometheus/pull/15097
  • https://github.com/prometheus/prometheus/pull/15150

Time required for the talk

10min

Link to slides/demos

No response

About you

Primary a web developer Dabbling with Go and contributing to Prometheus

Availability

19/10/2024

Any comments

My work is about what I did in Go but the techniques I cover should be language agnostic I'll try to keep it as approachble as possible

I'm strapped for availability so the description I gave is for a longer talk (30-40min) but the scope for this one is much smaller

Maniktherana avatar Oct 12 '24 15:10 Maniktherana