krakjoe / stat

A super modern high performance profiler for production
210 stars 7 forks source link

A simple example to profile a function or similar construct #10

Open rask opened 5 years ago

rask commented 5 years ago

As the way stat works is quite different from things like Xdebug that just dump a valgrind blob that can be parsed after the fact, a short example could ease in developers who wish to try stat, but are used to valgrind tooling.

It would be helpful to have a small example of a stat client (even in pseudo-code) that displays how to aggregate and parse the frame data that the stat socket outputs, in order to see how a function or a class is performing.

Or is this on a roadmap, but is post-poned until stat is more developed in terms of features and polish?

krakjoe commented 5 years ago

It's a good question ...

Right now, I'm focused on the internals of stat, the format of data over the wire and so on. It's quite fast moving and likely to change (#7).

In addition, I'm hoping that collaborators will come forward to help shape data and API ...

I think I'll aim to start writing some Wiki pages sometime soon, about the general differences between a conventional profiler and stat and the different applications the data might have (it's not restricted to a profiler).

rask commented 5 years ago

I see, sounds like a solid plan. Let me know if you need help in validating Wiki contents when you begin working on them. I will try and see how a stat client could work and see if I can be of any help there if I have the time.