[systemd-devel] [PATCH][RFC][V2] systemd-analyze: rewrite in C. (Was: systemd-analyze-197 broken)

William Giokas 1007380 at gmail.com
Fri Jan 25 23:01:37 PST 2013


On Sun, Jan 20, 2013 at 06:00:29PM +0100, Peeters Simon wrote:
> Hej all,
> 
> Because of the discution about the python dependencies for systemd-analyze
> I made a rewrite in C.
> 
> The patch is available from my github repo[1] so please test it.
> (especially efi systems with gummyboot since I am still stuck with BIOS)
> 
> What is new about this c implementation?
>  - written in C.
>  - no deps on graphical libraries.
>  - fixes a bug in 'blame' where systemd-analyze would skip oneshot services.
>  - generates cleaner svg files.
>  - can serve as a basis for further bootchart/analyze intgration.
>  - faster[2]: (numbers from my netbook)
>                    C         Python
>     systemd-analyze time
>         real    0m0.052s    0m1.419s
>         user    0m0.020s    0m0.427s
>         sys     0m0.013s    0m0.100s
> 
>     systemd-analyze blame
>         real    0m3.852s    0m10.225s
>         user    0m0.990s    0m7.850s
>         sys     0m0.213s    0m0.980s
> 
>     systemd-analyze plot
>         real    0m3.861s    0m11.824s
>         user    0m1.030s    0m9.203s
>         sys     0m0.220s    0m1.030s
> 
> Changes between this version and the one Auke published:
>  - code deduplication.
>  - removal of unnescecary copy pasted code.
>  - fixed the 'blame' bug mentioned above.
> 
> 
> Simon Peeters
> 
> [1] https://github.com/SimonPe/systemd/commit/4ee5eb2f83906ee7b8c0c886bf32e043c1f945fb.patch
> [2] even though it is not performance critical it feels a lot smoother now.
> 

So I've been using your patch successfully for a while now (great job,
by the way) and I like to see a nice graph of my boot every once in a
while, so I ran `systemd-analyze plot > boot.svg`[3] and pulled it up in my
browser. I noticed that the width of it is quite a bit too small for my
system. Besides that, excellent job! (I can actually get the cut off
information just fine anyway, it's just that it's not on the chart.)

[3] http://ompldr.org/vaDg2cA/boot.svg

Thanks,
-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130126/cf8dda37/attachment.pgp>


More information about the systemd-devel mailing list