]> git.ipfire.org Git - thirdparty/systemd.git/commit
tools/analyze-dump-sort: a helper to compare two 'systemd-analyze dump' outputs
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Jun 2021 14:56:31 +0000 (16:56 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 4 Jun 2021 10:09:58 +0000 (12:09 +0200)
commit19c79550b489740b3473d7c76ff6aadf739160e2
tree1ce55a95c4ecceeaa1063487bf74b5798a38b967
parent771bdb6aaeb2873011edb72c8f861c41414563d9
tools/analyze-dump-sort: a helper to compare two 'systemd-analyze dump' outputs

Lines in the dumps are ordered by some pseudo-random hashmap entry order, which
makes it hard to diff two outputs. This sort the entries alphabetically, and
also sorts items within the entries, and supresses timestamps and other fields
which always vary.

We could sort the output inside of systemd itself, but it'd make things more
complex, and we probably don't need output to be sorted in most cases. It also
wouldn't be enough, because timestamps and such would still need to be ignored
to do a nice diff. So I think doing the sorting and suppression in a python
helper is a better approach.
tools/analyze-dump-sort.py [new file with mode: 0755]