Talk proposal: Breaking and optimizing the Prometheus parser
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
Thank you for this submission @Maniktherana ! Our audience primarily consists of Python learners, users, and developers. Since your talk focuses heavily on Prometheus(which is largely written in Go), it would be helpful to clearly outline the prerequisites above. Additionally, based on the limited time, highlighting only a few aspects of Prometheus that may intrigue the Python audience could inspire them to explore further on their own.
Thank you for this submission @Maniktherana ! Our audience primarily consists of Python learners, users, and developers. Since your talk focuses heavily on Prometheus(which is largely written in Go), it would be helpful to clearly outline the prerequisites above. Additionally, based on the limited time, highlighting only a few aspects of Prometheus that may intrigue the Python audience could inspire them to explore further on their own.
Yeah I'm basically resuing a CFP for another talk but I don't plan on diving into Go that much. I'd be covering how i navigated the large repository of Prometheus. I'd explain what Prometheus is, the scope of my work (parsers and what they are how they work) and finally how benchmarking/profiling works to help identify bottlenecks. I hope this clears it up but I'm well aware of the type of audience that may be present.
I can update the prerequisites section soon to reflect this
@Maniktherana the slots for lightning talks are 5 mins, you'll need to squeeze your talk a bit more to fit that slot, but I'm marking this as accepted.
@Schefflera-Arboricola I think it's fine if there are no prerequisites, it's a lightning talk if I am not wrong, and those we usually do on the spot.
5 min might be pushing it to cover everything ngl
5 min might be pushing it to cover everything ngl
considering this as a "no" for a lightning talk
Hi @Maniktherana! It's been a while since you proposed this talk, and my apologies for how long the review process has taken – would you be interested in delivering it in the May edition of the meetup? While the venue and logistics are undecided at the moment, it's slated to be on the 17th of May, and it could be in collaboration with PyData Delhi. Having your session as a short, fifteen-minute lightning talk would be nice. While this talk has been previously accepted, if you can manage to tailor the content for a Python-specific audience, that's a plus.
Please let us know your availability whenever it's convenient for you to do so. Thank you!
Hi @Maniktherana! It's been a while since you proposed this talk, and my apologies for how long the review process has taken – would you be interested in delivering it in the May edition of the meetup? While the venue and logistics are undecided at the moment, it's slated to be on the 17th of May, and it could be in collaboration with PyData Delhi. Having your session as a short, fifteen-minute lightning talk would be nice. While this talk has been previously accepted, if you can manage to tailor the content for a Python-specific audience, that's a plus.
Please let us know your availability whenever it's convenient for you to do so. Thank you!
Hey sorry about the late reply. Sure thing! I'm down
Thank you for your talk yesterday, @Maniktherana, I'm glad you were able to deliver it and apologies again for the time it took for us to do that! 🙈