Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I hung back because I don't know much about either Erlang or Mnesia, but I know a lot about performance tuning, and from the discussion so far it sounds pretty typical.</p> <p>These tools <code>fprof</code> etc. sound like most tools that get their fundamental approach from <code>gprof</code>, namely instrumenting functions, counting invocations, sampling the program counter, etc. Few people have <a href="https://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343">examined the foundations</a> of that practice for a long time. Your frustrations sound typical for users of tools like that.</p> <p>There's a method that is less-known that you might consider, <a href="https://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024">outlined here</a>. It is based on taking a small number (10-20) of samples of the state of the program at random times, and understanding each one, rather than summarizing. Typically, this means examining the call stack, but you may want to examine other information as well. There are different ways to do this, but I just use the pause button in a debugger. I'm not trying to get precise timing or invocation counts. Those are indirect clues at best. Instead I ask of each sample <em>"What is it doing and why?"</em> If I find that it is doing some particular activity, such as performing the X query where it's looking for y type answer for the purpose z, and it's doing it on more than one sample, then the fraction of samples it's doing it on is a rough but reliable estimate of what fraction of the time it is doing that. Chances are good that it is something I can do something about, and get a good speedup.</p> <p><a href="https://stackoverflow.com/questions/926266/performance-optimization-strategies-of-last-resort/927773#927773">Here's a case study of the use of the method.</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload