[Kde-pim] CPU-Time within the function slotMsgRetrieved

Thomas McGuire mcguire at kde.org
Thu Oct 8 15:14:51 BST 2009


Hi,

On Tuesday 06 October 2009 19:14:37 you wrote:
> I'm making some CPU-Time mesures bei getting 10000 of small mails with
>  POP3. Each message has only 125 bytes netto and 1200 bytes brutto.
> The CPU-last for the POP3-server is about 1% on the first host.
> The intranet has 100Mb-ethernet.
> The CPU-last for the Kmail (the client) is about 5% on the second host.
> 
> I make small modifications on Kmail, at the file popaccount.cpp, to get the
> CPU-Time at the beginning and at the end of the function slotMsgRetrieved.
> I use the function
>   clock_gettime (CLOCK_PROCESS_CPUTIME_ID, ...
> to get the CPU-Time and the function
>   kDebug()
> to make a protokoll at the terminal.
> Some grep and gawk uses give me the data in the right format to make a
>  picture with OpenOffice.
> 
> The picture shows the result. The X-axis is the number of the
>  POP-connection to the server ( the number of the message I get), the
>  Y-axis shows the time between two messages. There is only 1000 points here
>  (because of the size of the PDF-file).
> 
> One can see a very big differences on the Y-axis. About 1:40. One can see
>  also some "lines" where the time is nearly the same. Another picture
>  should show that the time within the function is nearly the same for all
>  the messages.
> 
> The questions I like to give you is:
> What is appening outside the function slotMsgRetrieved?
> Which task(s) is/are consuming so much of the CPU-time?

For finding out what uses the CPU in slotMsgRetrieved(), I recommend to use 
valgrind with the callgrind skin, and then visualize the data in KCachegrind.
See http://wiki.services.openoffice.org/wiki/Callgrind for a small how-to. 
That is for OpenOffice, but it should be very similar for KMail. For KMail, 
make sure you pass the command line option --nofork, otherwise valgrind will 
not run on the correct process.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20091008/adaa2564/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list