Skip to main content

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.

alt text

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:

  1. Create a file "bench_.py".
  2. 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)
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

widgetmark-0.1.0.tar.gz (25.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page