Skip to main content

Measures program speed

Project description

Optimization Library

The optimization library measures the general speed of a program based on the last run.

alt text

Example Usage:

First, import the library:

import OptimizationLibrary 

Next, the library needs to be initialized:

opt = OptimizationLibrary()

Finally, we can start and stop the timer:

opt.start_timer()
opt.end_timer()

Example File

import optimization
def test():
    opt = optimization.OptimizationLibrary() 
    opt.start_timer()
    your_function()
    opt.end_timer()
if __name__ == '__main__':
    test()

Additional Notes:

This is a developer tool.
The library has a small performance window (to account for natural program variance).
The library can also be initialized with an optional parameter to show performance increases/decreases visually:

opt = optimization.OptimizationLibrary(variance=2.5, color=True) 

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

optimization-lib-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

optimization_lib-1.0.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file optimization-lib-1.0.0.tar.gz.

File metadata

  • Download URL: optimization-lib-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for optimization-lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 46febcbfa969855859d2ea8f32c93aa43424847c205924a7f7d0c3d70e3e2a32
MD5 47bb3ff67101b23fe1e63c3d57d088d6
BLAKE2b-256 a5213b2dda3366c844088f5d2f473675754a983e7f5e81499a3b6f0053c76683

See more details on using hashes here.

File details

Details for the file optimization_lib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: optimization_lib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for optimization_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a214fb99484ee147a073ac0685be61ffdfec6d10086ae88d03fa3131e6fd0c5a
MD5 ae2392711616157d21b2750db70f2beb
BLAKE2b-256 9028f060c685c05dc2f95b37b4de949a158c9a8632c248dee647c3838102499f

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