Benchmarking Framework for Qt Widgets.
Project description
WidgetMark
The goal of this project is to create a Benchmarking Framework, which allows you to test the performance of a specific GUI Widget. The Framework is written as part of my bachelor's thesis.
For users
How do I install it?
Installation is very simple, since all dependencies are documented in setup.py. The following command will provide you with the minimal dependencies to start writing your own benchmark use cases.
python -m pip install -e .
How can I try it out?
There are a few example implementations, that you can run. They can be located the examples folder. These contain different use cases, which are ready to run.
cd path/to/widgetmark
pip install -e .
widgetmark examples
To create profiles of the Use Cases you are running and view them using the profile viewer snakeviz in your browser, run:
widgetmark --profile --visualize examples
To visualize already created Profiles, you can use snakeviz directly:
snakeviz folder/with/profile_files
It is also possible to run only specific Use Cases, e.g. for running the Label Example Use Case which tests the setText operation, run:
widgetmark examples/bench_label.py::SetTextUseCase
To see more options for the command line interface, run:
widgetmark --help
How can I create my own Use Cases?
Widgetmark can be used with different GUI Backends, but currently only Qt is
supported. Benchmarks are python files named "bench_*.py" which contain a set
of use cases. Each use Case is a class derived from the abstract class
widgetmark.UseCase
. Each Use Case defines
which widget it wants to use, the operation it want's to be investigated, and
a set of other properties which define f.e. what Frame Rate should be achieved.
To define your own Benchmarks, you simply have to:
- Create a file "bench_.py".
- Add a class derived from
widgetmark.UseCase
and implement all functions. (Tip: Properties can be simply implemented as class attributes, this will save you a few lines of code, for inspiration have a look at the examples folder) - Run widgetmark.
What are the results?
Widgetmark does measure / gather the following things for each use case:
- Frame Rate / Redraw costs: How often per second can the widget handle specific operations?
- Profile: Detailed listing of the costs of called functions, which allows to discover bottle necks in code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file widgetmark-0.1.0.tar.gz
.
File metadata
- Download URL: widgetmark-0.1.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a678dda0c46178d6c0d594b00a687523651ef0eda690a2d103217d705ae6735d |
|
MD5 | ee0dc8f9c141b3751d792ea7ff257cfc |
|
BLAKE2b-256 | 5590cb0dd58e13b2f93c6d94198f39ce979d35ff86b010ee3e1c2332d549bcf5 |