Skip to main content

Analyses the outcomes of two Gradle Profiler benchmarks with the Paired T-test statistical technique

Project description

Paired T-tests for Gradle Benchmarks

Flake8 Maintainability codecov PyPI Main License

Context

Complete blog post to come. Stay tunned

gradle-profiler-pttest can analyse the outcomes of two benchmarks generated by Gradle Profiler with the Paired T-test statistical technique.

The goal is provide a super easy way to compare two benchmarks for Gradle builds - for the same task - without being mislead by simple means, since we are leveraging on a more robust statistical evidence on top of the outcomes.

This tool is built on top of pingouin, an opinionated Statistics library which leverages NumPy, Pandas and SciPy. Among other things, gradle-profiler-pttest features :

  • An opinionated hyphotesis test (left-tailed) where we want to check if modified build conditions (h1) have a mean statistically smaller than the one we get from baseline build conditions (h0), which means better execution times given the modifications applied
  • Auto-correction for benchmark samples with different sizes

Note that the ideal size for samples should be a small one - ideally between 10 and 30 measured builds - in order to make sense of T-student analysis.

Installing

Install from your CLI with pip

pip install gradle-profiler-pttest

Requires Python 3.8.5 or newer.

When running this tool on MacOS Catalina or newer, please check instructions in order to have SciPy properly installed in your local machine.

Using

  • Run the benchmarks with Gradle profiler for the status quo (baseline) and for the modifications applied the your Gradle project (modified)

  • Supply the generated CSV files to gradle-profiler-pttest

gradle-profiler-pttest \
	-b <path/to/baseline/benchmark.csv> \
	-m <path/to/modified/benchmark.csv>
  • Profit results

Limitations

Right now gradle-profiler-pttest supports only one Gradle task per supplied benchmark sample, taking the first task executed as reference for the analysis given a multi-task benchmarked scenario.

Contributing

  • Ensure you have Python 3.8.5 or newer installed
  • Ensure you have flake8 installed and supported in your text editor / IDE
  • Ensure you have Poetry installed
  • Check the contribution guidelines
  • Make sure you have a green build
make flake8
make test
  • Submit your PR 🔥

Credits

Author

Coded by Ubiratan Soares (follow me on Twitter)

License

The MIT License (MIT)

Copyright (c) 2020 Dotanuki Labs

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

gradle-profiler-pttest-0.0.4.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

gradle_profiler_pttest-0.0.4-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file gradle-profiler-pttest-0.0.4.tar.gz.

File metadata

  • Download URL: gradle-profiler-pttest-0.0.4.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-1032-azure

File hashes

Hashes for gradle-profiler-pttest-0.0.4.tar.gz
Algorithm Hash digest
SHA256 fbbc9e9aaf7af47dd6c12bff6e87989b4b295b37c182ca02e43c66ddc60d0fa5
MD5 5ecb5be11a18165a853dd815169dc1b5
BLAKE2b-256 23f0ea73409d0a75dbaa33b6937b79d1305471e0f858965b1a4b4d25b1e9f3fb

See more details on using hashes here.

File details

Details for the file gradle_profiler_pttest-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for gradle_profiler_pttest-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e3ebfe66061b837773ea49dde13b20caa69bd0329b13a14a49b954b7ffedc908
MD5 8361c194680e72a9c8e13ec2e6121f83
BLAKE2b-256 622da746ed51118266bf63b9751ddc5cd2de8147364fedf32a4efe2ae1127321

See more details on using hashes here.

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