[systemd-devel] [PATCH][RFC][V2] systemd-analyze: rewrite in C. (Was: systemd-analyze-197 broken)
Peeters Simon
peeters.simon at gmail.com
Sun Jan 20 09:00:29 PST 2013
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.
2013/1/17 Kok, Auke-jan H <auke-jan.h.kok at intel.com>:
> For those that wish to test this, here is a patch against HEAD that
> integrates it and replaces the current script:
>
> http://foo-projects.org/~sofar/0001-systemd-analyze-rewrite-in-C.patch
>
> This should give people some time to test it.
>
> I spotted a few problems but nothing unfixable/problematic - e.g. on
> my system it throws DBus errors when trying to get the EFI boot
> parameters.
>
> Cheers,
>
> Auke
More information about the systemd-devel
mailing list