DTraceing Python (long post)

Patric Fors patric at zro.se
Mon Apr 21 12:45:10 BST 2008


21 apr 2008 kl. 01.16 skrev Martin Pool:

> It looks like just from the file heads that you posted it's showing
> most of the time for small branches being in imports of Python
> modules.  We already knew that, but at least it shows its measuring
> the right thing.
>
> I think what would be most interesting now is if you could measure say
> 'bzr add' in a a large file tree, and make the whole report available
> somewhere.  It's probably too big to send to the list so you could put
> it on a web server somewhere, or open a bug at bugs.launchpad.net/bzr
> and attach it there.


Ok, here is the result.

SCRIPT "py_calltime.d"

TERMINAL 1 (bzr)

nollan at amanda:~$ cd work/
nollan at amanda:work$ mkdir bzr.dtrace
nollan at amanda:work$ cd bzr.dtrace/
nollan at amanda:bzr.dtrace$ curl -O http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0b5/source/firefox-3.0b5-source.tar.bz2
   % Total    % Received % Xferd  Average Speed   Time    Time      
Time  Current
                                  Dload  Upload   Total   Spent     
Left  Speed
100 34.8M  100 34.8M    0     0   505k      0  0:01:10  0:01:10  
--:--:--  526k
nollan at amanda:bzr.dtrace$ bzcat firefox-3.0b5-source.tar.bz2 | tar xf -
nollan at amanda:bzr.dtrace$ ls -l
total 71352
-rw-r--r--   1 nollan  nollan  36531680 21 Apr 08:29 firefox-3.0b5- 
source.tar.bz2
drwxr-xr-x  60 nollan  nollan      2040 27 Mar 03:24 mozilla
nollan at amanda:bzr.dtrace$ find . | wc -l
    45372
nollan at amanda:bzr.dtrace$ du -dsk ./mozilla/
677712	./mozilla/
nollan at amanda:bzr.dtrace$ bzr init


TERMINAL 2 (DTrace)

nollan at amanda:Python$ sudo ./py_calltime.d > /Volumes/TMB/ 
bzr_add_mozilla_py_calltime_DTrace.txt


TERMINAL 1 (bzr)

nollan at amanda:bzr.dtrace$ bzr add mozilla/
added mozilla
added mozilla/CVS
added mozilla/LEGAL
added mozilla/LICENSE
added mozilla/Makefile.in
...
added mozilla/security/nss/tests/libpkix/pkix_tests/top/build_data/ 
single_path/signature/pass/CVS/Tag
added mozilla/toolkit/mozapps/update/src/updater/macbuild/Contents/ 
Resources/English.lproj/MainMenu.nib/CVS/Entries
added mozilla/toolkit/mozapps/update/src/updater/macbuild/Contents/ 
Resources/English.lproj/MainMenu.nib/CVS/Repository
added mozilla/toolkit/mozapps/update/src/updater/macbuild/Contents/ 
Resources/English.lproj/MainMenu.nib/CVS/Root
added mozilla/toolkit/mozapps/update/src/updater/macbuild/Contents/ 
Resources/English.lproj/MainMenu.nib/CVS/Tag
ignored 1 file(s).
If you wish to add some of these files, please add them by name.

TERMINAL 2 (DTrace)

nollan at amanda:Python$ ls -l /Volumes/TMB/ 
bzr_add_mozilla_py_calltime_DTrace.txt
-rw-r--r--  1 nollan  nollan  180954 21 Apr 11:53 /Volumes/TMB/ 
bzr_add_mozilla_py_calltime_DTrace.txt


SCRIPT "py_flowtime.d"

nollan at amanda:bzr.dtrace$ rm -rf .bzr/
nollan at amanda:bzr.dtrace$ bzr init
nollan at amanda:bzr.dtrace$ ls -la
total 71352
drwxr-xr-x   5 nollan  nollan       170 21 Apr 11:55 .
drwxr-xr-x  43 nollan  nollan      1462 21 Apr 08:28 ..
drwxr-xr-x   8 nollan  nollan       272 21 Apr 11:55 .bzr
-rw-r--r--   1 nollan  nollan  36531680 21 Apr 08:29 firefox-3.0b5- 
source.tar.bz2
drwxr-xr-x  60 nollan  nollan      2040 27 Mar 03:24 mozilla


TERMINAL 2 (DTrace)
nollan at amanda:Python$ sudo ./py_flowtime.d > /Volumes/TMB/ 
bzr_add_mozilla_py_flowtime_DTrace.txt


TERMINAL 1 (bzr)
nollan at amanda:bzr.dtrace$ bzr add mozilla/
(same output as above of course)

*** FAILURE ***
My laptop just shutted down, no warnings at all.
Replicated the computer failure three times, so unfortunately no  
complete "py_flowtime.d" logs... :(
Still though, might be usefull. Will try to do the above on a  
different platform/computer to get the result.
(renamed the file so it's more obvious that it's uncomplete report  
from DTrace "py_flowtime.d")

Here is what I got before hardware just shutdown:
nollan at amanda:Python$ ls -l /Volumes/TMB/ 
bzr_add_mozilla_py_flowtime_UNCOMPLETE_DTrace.txt
-rw-r--r--   1 nollan  nollan  344126427 21 Apr 12:33  
bzr_add_mozilla_py_flowtime_UNCOMPLETE_DTrace.txt

The compressed files are located here:
http://zro.se/bzr/

With Best Regards,
Patric Fors






More information about the bazaar mailing list