Skip to Main Content
Talk Intermediate

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

Approved
Session Description

# 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

Session Categories

FOSS

Speakers

Manik Rana Contributor | Prometheus

Web developer passionate about random things in tech. Contributor @Prometheus

Manik Rana

Reviews

Reviews are hidden by the event organisers.