Skip to main content

A package to aid students of ISCTE in testing their algorithms

Project description

Welcome to Algopyformance

A library created to aid students of ISCTE-IUL, in Portugal, to build performance tests for their app. This is the first version, so it is very limited and the plotting functionality is not as functional as I wish but improvements are comming soon. I am open to suggestions of features I can add and improvements to my code.

The library uses the Builder pattern to offer a simple and easy to use API to build performance tests. It uses pandas to store the results of the tests, Seaborn to plot the results and matplotlib to show the plot. To build a test you just need to excute the following steps:

  1. Import the TestStackBuilder from the tests module
  2. Add targets which are functions that you want to execute during the test (you can add multiple but keep in mind that they should contain the same parameters)
  3. (Optional) If you want to repeat the test multiple times use the repeat method to pass the number of repetitions
  4. (Optional) If you want to let the TestStackBuilder plot your data you can add the flag to the builder using the do_show_plot. Keep in mind that this feature doesn't work very well and
  5. Use build to generated a TestStack
  6. Finally, run the test using the run method
  7. (Optional) if the plot representation doesn't suit you you can use the output of the run method which is a dataframe of results from the tests to build your own plot using Seaborn or Matplotlib.

The steps described above are exemplified in the code below

from sp_algopyformancelib.tests import TestStackBuilder

new_stack = TestStackBuilder()\
        .add_target(my_func_recur)\
        .add_target(my_func_iter)\
        .add_param_combinations([(x,) for x in range(20, 51, 5)])\
        .do_show_plot()\
        .build()

results = new_stack.run()

print(results)





Copyright © 2022 Stefan Postolache

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

sp_algopyformance-0.1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sp_algopyformance-0.1.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sp_algopyformance-0.1.2.tar.gz.

File metadata

  • Download URL: sp_algopyformance-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.0

File hashes

Hashes for sp_algopyformance-0.1.2.tar.gz
Algorithm Hash digest
SHA256 07e3c9368575816512b58df98e39c2a2e0e3801d6630725f6c4d2835c5882cd8
MD5 7a1721d912c1e042d75234b85e2766f8
BLAKE2b-256 dc6d321f80eb680cbd662d70886694373836f3c81f1743e92fd06514d6f8e726

See more details on using hashes here.

File details

Details for the file sp_algopyformance-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sp_algopyformance-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.0

File hashes

Hashes for sp_algopyformance-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e47016ba7a66555f11e32e416a9de3a8f85d483096648d1efef3de9a68a4d2b
MD5 43296ec2896f987f46de9ad5c2c3dd72
BLAKE2b-256 d1286c0880d52903bf20e92e598e19e57852cce738f9c0cdebd2dacd391d17f6

See more details on using hashes here.

Supported by

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