This tool must be run from the folder where an executable minigzip
or minideflate
exist.
Ex: ../deflatebench/deflatebench.py --gen
. (I suggest making a symlink to it though, for example in /usr/bin/)
You must provide the tool with testdata files.
To setup the required Python packages use the following command:
python3 -m pip install -r requirements.txt
--write
parameter creates a new config file as ~/deflatebench.conf- Supports profiles in separate config files
- Supports overriding config files with command-line parameters
PS: Several of these require root or sudo permissions
- Supports
perf
ortime
for measuring cputime [Default perf] - Supports
chrt
to set real-time priority [Default OFF] - Supports
nosync
library preloading [Default OFF] - Supports
turboctl
for disabling cpu turbo while benchmarking [Default OFF]turboctl
script included in repo supports disabling turbo withintel_pstate
cpu-governor, and should be copied do /usr/bin/turboctl and added to sudo config
- Supports
cpupower
for locking cpu speed and disabling powersaving while benchmarking [Default OFF]cpu_std_minspeed
configures normal minimal cpu speed in Mhz to reset back to after benchmark [Default 1000]cpu_std_maxspeed
configures normal maxumum (non-Turbo) cpu speed in Mhz to reset back to after benchmark [Default 2200]cpu_bench_speed
configure cpu speed to use while benchmarking, should be same as cpu normal non-turbo max speed or a little slower(200Mhz for example) [Default 2000]
- Specify number of testruns [Default 15]
- Specify number of worst results to ignore [Default 5]
- Specify minlevel [Default 0]
- Specify maxlevel [Default 9]
- Specify testtool either minigzip or minideflate [Default minigzip]
- Single, tests all levels using the same testdata-file
- Multi, allows you to specify separate testdata-files per level
- Gen, lets you provide the tool with a single testdata-file, and the tool will generate files of the appropriate sizes (in MiB) according to what is specified under [Testdata_Gen] in the configfile
- Gen works by concatenating the source file multiple times until the asked for size is met or exceeded.
- This works best with a relatively small input file. I use a 15MiB file, and let all levels get a generated size that is a multiple of 15MiB.
- Please note that for best performance, the temp folder specified in the config [Default /tmp/] should be tmpfs or ramdisk.
As a convenience, I have created a couple uncompressed tar files that can be used for single
and gen
testmodes:
The original source of this testcorpus is here: Silesia