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.1.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.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sp_algopyformance-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 22feb177809a12c72703d37ad99388bdf83843804530666b7b3f2f759b5842af
MD5 356499d5288d0624569b814b9e99c1bf
BLAKE2b-256 d76963257f9065ab39efc89d6c19098a1939287f27151170e031ad65427fa7b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sp_algopyformance-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a73dea3922b6994462f51f31f287fd5259262f9dbad62f686cc938e74a78dac
MD5 89e2c42581e97b6cf81b6213f10cec64
BLAKE2b-256 3fbe4f4cb62900163b030baf3e20cf123b88f06b7cb4e74c649f8678d43787b9

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