Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zlib-ng/deflatebench
Small tool to benchmark zlib-ng
https://github.com/zlib-ng/deflatebench
benchmarking testing zlib zlib-license zlib-ng
Last synced: about 2 months ago
JSON representation
Small tool to benchmark zlib-ng
- Host: GitHub
- URL: https://github.com/zlib-ng/deflatebench
- Owner: zlib-ng
- Created: 2020-06-20T13:44:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T12:34:01.000Z (almost 2 years ago)
- Last Synced: 2024-05-09T23:18:52.124Z (8 months ago)
- Topics: benchmarking, testing, zlib, zlib-license, zlib-ng
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 6
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## deflatebench - a tool that can benchmark minigzip/minideflate
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.### Prerequisites
To setup the required Python packages use the following command:
```
python3 -m pip install -r requirements.txt
```### Config Files
* `--write` parameter creates a new config file as ~/deflatebench.conf
* Supports profiles in separate config files
* Supports overriding config files with command-line parameters### System Tuning
PS: Several of these require root or sudo permissions
* Supports `perf` or `time` 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 with `intel_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]### Test configuration
* 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]### Test modes
* 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.### Example Testdata
As a convenience, I have created a couple uncompressed tar files that can be used for `single` and `gen` testmodes:
* [202MiB full Silesia testcorpus](https://mirror.circlestorm.org/silesia.tar)
* [15MiB custom cropped Silesia testcorpus](https://mirror.circlestorm.org/silesia-small.tar)The original source of this testcorpus is here: [Silesia](http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia)