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.
This library can be used by developers to speed up their programs.

alt text

Example Usage:

First, import the library:

from optimization import optimization

Next, the library needs to be initialized:

opt = optimization.OptimizationLibrary()

Finally, we can start and stop the timer:

opt.start_timer()
'''
implement function/program to meausure 
'''
opt.end_timer()

alt text

Example File

from optimization import optimization

def function_to_optiimize()
    pass

def test():
    opt = optimization.OptimizationLibrary() 
    opt.start_timer()
    function_to_optiimize()
    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).
This is an optional parameter that can be changed with the 'variance' optional parameter.
The library can also be initialized with an optional parameter to show performance increases/decreases visually. This can be changed with the 'color' parameter:

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

alt text

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-2.0.0.tar.gz (2.7 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-2.0.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: optimization-lib-2.0.0.tar.gz
  • Upload date:
  • Size: 2.7 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-2.0.0.tar.gz
Algorithm Hash digest
SHA256 25dac3f44d24edfae05698900b009e7f12cc427f2b084c44eadcba7959ca7fc9
MD5 b716788382f3888c74c49e9a8b132baa
BLAKE2b-256 31dcd2f91a6fdbaf8b88139020c7ebda8e7d43314ffd3733707a5f69709b42a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: optimization_lib-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 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-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f843226007b8d09aac24ab466642d157139485f66c7af6eb1fe34f4ae08cb058
MD5 515a536f913b16ff1403efe7dfb933b8
BLAKE2b-256 7665d1f60476c8208f6f8a28b8098c374aa0a38fc4e65cd01a6f6547b42ff8c7

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