How to interpret a flamegraph?

55 points Proper-Resource8280

Hey guys
ive been doing some rust for about a year now, im writing an tcp proxy, and ive seen some performance gaps on that, i tried to generate a flamegraph to try to optimize it, but im not sure how to interpret it, after some refactoring, i was able to improve the performance, and after generating another flamegraph, ive come up with this

https://preview.redd.it/p0mwoh8ikif91.png?width=2554&format=png&auto=webp&s=a3e7737982b386338709bc0d7cc47e86f43344a3

but im not sure how to interpret this
so tokio rutime takes the majority of time in my code, so it means that im not using tokio in a proper way? im confused