Skip to main content

A high-performance benchmarking library for Python

Reason this release was yanked:

errors in import

Project description

PyPerfCheck – Easy Benchmarking for Python Code

PyPerfCheck is a high-performance benchmarking library for Python. It allows you to measure and compare the execution time, CPU usage, and memory usage of Python functions. It supports synchronous, asynchronous, multi-threaded, and multi-processed functions, making it a versatile tool for performance analysis.


Features

  • Benchmark Synchronous Functions: Measure execution time, CPU usage, and memory usage.
  • Benchmark Asynchronous Functions: Supports async functions for I/O-bound tasks.
  • Multi-Threading Benchmarking: Test functions using multiple threads.
  • Multi-Processing Benchmarking: Test functions using multiple processes.
  • Visual Reports: Generate bar charts for execution time, CPU usage, and memory usage.
  • Easy-to-Use: Simple API with decorators and helper methods.

Installation

Install PyPerfCheck using pip:

pip install pyperfcheck

Quick Start

  1. Import the library:

    from pyperfcheck import PyPerfCheck
    
  2. Benchmark a function:
    Use the benchmark decorator to measure execution time, CPU, and memory usage for any function.

    @PyPerfCheck.benchmark
    def example_function():
        # Your code here
        time.sleep(1)
    
  3. Compare multiple functions:
    You can benchmark and compare the performance of multiple functions using compare.

    def function1():
        time.sleep(1)
    
    def function2():
        time.sleep(2)
    
    PyPerfCheck.compare([function1, function2])
    
  4. Generate Visual Reports:
    PyPerfCheck can also generate bar charts to visualize the benchmark results.

    # After calling PyPerfCheck.compare(), the visual report will be shown
    

License

MIT License. See LICENSE for details.

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

pyperfcheck-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

pyperfcheck-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyperfcheck-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for pyperfcheck-0.1.1.tar.gz
Algorithm Hash digest
SHA256 165ecc6f9709ffb041a1c06aefb2ae35485c25bab4029f7591402ca7358832f8
MD5 46993b2090af7d51328366ef0fd468e9
BLAKE2b-256 0a818068e43c3427cde8628f0e60c8b712a7e5b0715d2a6e6c9005362f84db45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyperfcheck-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for pyperfcheck-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aad4121444559f4b7bfa828ea59479d833582f54c1b4058883a6246ba6d5825e
MD5 a941ff9c216511fc8b0cb68bd22f47f7
BLAKE2b-256 a5709cb67592b6f30a0e4fa6998a529e8b34b39edadf0b86b7e45dc328148cb2

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