-1

I have a bunch of profiles about my application(200+ profiles per week), I want to analyze them for getting some performance information.

I don't know what information can be analyzed from these files, maybe the slowest function or the hot-spot code in the different release versions?

I have no relevant experience in this field, has anyone had that?

fu4ng
  • 27
  • 4
  • The language I used is `golang` and I got those profiles through `go pprof` – fu4ng Jan 15 '22 at 15:28
  • 1
    What kind of profiles are they? What information do you want? Is your program under a uniform max load, or are you sampling random events at low load? You kind of have to profile with an intent, random data doesn’t necessarily help anything. – JimB Jan 15 '22 at 18:42

1 Answers1

2

Well, it depends on the kind of profiles you have, you can capture number of different kinds of profiles.

In general most people are interested in the CPU profile and heap profile since they allow you to see which functions/lines use the most amount of CPU and allocate the most memory.

There are a number of ways you can visualize the data and/or drill into them. You should take a look at help output of go tool pprof and the pprof blog article to get you going.

As for the amount of profiles. In general, people analyze them just one by one. If you want an average over multiple samples, you can merge multiple samples with pprof-merge.

You can substract one profile from another to see relative changes. By using the -diff_base and -base flags.

Yet another approach can be to extract percentages per function for each profile and see if they change over time. You can do this by parsing the output of go tool pprof -top {profile}. You can correlate this data with known events like software updates or high demand and see if one functions starts taking up more resources than others(it might not scale very well).

If you are ever that the point where you want to develop custom tools for analysis, you can use the pprof library to parse the profiles for you.

Dylan Reimerink
  • 5,874
  • 2
  • 15
  • 21