<p dir="ltr">On 14 Jun 2013 09:18, "Arink Verma" <<a href="mailto:arinkverma@gmail.com">arinkverma@gmail.com</a>> wrote:<br>
><br>
><br>
>> You're looking for the ProfilerStart/ProfilerStop functions, the<br>
>> former takes a filename to write the profiler to (like "ls.prof" or<br>
>> "x-plus-x.prof"):<br>
>>   <a href="http://www.mail-archive.com/numpy-discussion@scipy.org/msg41451.html">http://www.mail-archive.com/numpy-discussion@scipy.org/msg41451.html</a><br>
><br>
><br>
> I followed that and able to get a callgraph[1], but it doesnt contains all the edges.<br>
><br>
> [1] <a href="https://docs.google.com/file/d/0B3Pqyp8kuQw0eVM4ajVYLWtfZVU/edit?usp=sharing">https://docs.google.com/file/d/0B3Pqyp8kuQw0eVM4ajVYLWtfZVU/edit?usp=sharing</a></p>
<p dir="ltr">It's a probabilistic sampling profiler, so if it doesn't have enough samples then it can miss things. 227 samples is way way too low. You need to run the profiled code for longer (a few seconds at least), and if that's not enough then maybe increase the sampling rate too (though be careful because setting this too high can also add noise).</p>

<p dir="ltr">-n</p>