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

Kok, Auke-jan H auke-jan.h.kok at intel.com
Tue Jan 22 14:51:25 PST 2013


On Tue, Jan 22, 2013 at 2:14 PM, David Strauss <david at davidstrauss.net> wrote:
> On Sun, Jan 20, 2013 at 9:00 AM, Peeters Simon <peeters.simon at gmail.com> wrote:
>> Because of the discution about the python dependencies for systemd-analyze
>> I made a rewrite in C.
>
> I was only advocating for the data collection side to move to C so
> small, Python-less systems can still dump startup data for analysis
> elsewhere.
>
> Is there a reason the code generates an SVG directly? It seems cleaner
> to generate a dot file, which is then trivial to pull into other
> rendering and visualization tools. Graphviz can create an SVG from a
> dot file (and would not have to run on the system that generates the
> dot file). Dot is also a more abstract DAG representation, allowing
> tools like X Dot [1] that browse the dot data directly.

it's my understanding that dot graphs (but I'm no expert) could
potentially work, but it has some drawbacks:

- it still requires a rendering step in order to visualize the data,
whereas SVG files can be displayed in any browser directly
- graphviz is all but friendly for the end user

Note that SVG's (even huge 3.0MB bootchart SVG's) render in a second
or so in chrome/firefox.

Simon used the same approach I used originally in bootchart and
renders straight to SVG. While that does mean hard-coding the SVG
output, it does make things fast and directly render-able - you can
put the output on an http server and people can just open the link in
a browser, etc..

I have nothing against -also- outputting a dot file, but if we ever
include more meta information in the graph, dot will fall short
quickly. Perhaps a --dot option can be added for those that really
want it?

Cheers,


Auke


>
> [1] http://code.google.com/p/jrfonseca/wiki/XDot
>
> --
> David Strauss
>    | david at davidstrauss.net
>    | +1 512 577 5827 [mobile]


More information about the systemd-devel mailing list