[Rpm-maint] rpm dependency check speed tester

Michael Schroeder mls at suse.de
Tue Aug 19 17:06:03 UTC 2014


Hi Panu et al,

attached is a small tool that can be used to check the speed
of rpm's dependency check.

Usage: ./rpmtimings first_header_file second_header_file...

For every argument it builds and runs a transaction consisting
of all headers contained in the file. The headers are each
preprended with a 4-byte length and concatenated, the ones
I used for testing are available via:

    ftp://ftp.suse.com/pub/people/mls

The fedora19 headers are from a system with the "gnome-desktop"
group installed, fedora20 was created with a distro-sync of said
system. You can create such a file from your installed rpms with:

    open(F, '-|', 'rpm', '-qa', '--qf', '%{HEADERIMMUTABLE}\n');
    while(my $rpm = <F>) {
        chomp $rpm;
        next if $rpm eq '(none)';
        my $head = pack('H*', "8eade80100000000".$rpm);
        print pack('N', length($head)).$head;
    }
    close F;

The tool sets the rpmdatabase to "`pwd`/rpmtimings.db" and
does not run any scripts.

Example output looks like:

$ rm -rf rpmtimings.db ; ./rpmtimings fedora19.hdrs fedora20.hdrs 
reading headers from fedora19.hdrs
running rpmtsCheck
rpmtsCheck took 41 ms
installing into database
rpmtsRun took 1421 ms
reading headers from fedora20.hdrs
running rpmtsCheck
rpmtsCheck took 78 ms
installing into database
rpmtsRun took 6395 ms

Thus it tested the installation of Fedora19 on a empty system
and then the upgrade to Fedora20.

Enjoy,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH,  GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpmtimings.c
Type: text/x-c++src
Size: 4083 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20140819/84b1d800/attachment.c>


More information about the Rpm-maint mailing list