Talk
Intermediate

Go-ing Under the Hood: Breaking and optimizing(?) the Promtheus Parser

Approved

# 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 put in my first PR

 - Now I'm [optimizing](https://github.com/prometheus/prometheus/pull/14965) 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](https://github.com/prometheus/prometheus/blob/main/model/textparse/openmetricslex.l) 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](https://github.com/prometheus/prometheus/issues/14808) and how I go about [optimizing it](https://github.com/prometheus/prometheus/pull/14965#issue-2542611710) by over 200%

## 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

None
FOSS

Manik Rana
Contributor Prometheus
Speaker Image

100 %
Approvability
5
Approvals
0
Rejections
0
Not Sure
The first talk I see which actually talks about the challenges faced when we actually start contributing to FOSS projects. The session seems to be detailed enough with actual experience and insights into contributing to a large production code base.
Reviewer #1
Approved
This is a very technical talk, exactly what some people will need. As long as we aren't stacked with technical talks this would be a great inclusion! Telling you story about how you solved a problem and contributed it upstream is exactly the kind of stories people need to hear
Reviewer #2
Approved
Reviewer #3
Approved
Reviewer #4
Approved
Reviewer #5
Approved