Skip to main content

Fast Python Script Execution Timer

Project description

FFpy is a command-line tool that measures the execution time of Python scripts. It provides flexibility by allowing you to specify the time unit (milliseconds or seconds) and the number of runs for more accurate measurements.

Installation

Install FFpy using pip:

pip install ffpy

Alternatively, you can clone this repository:

git clone https://github.com/anxkhn/FFpy.git
cd FFpy
pip install .

Usage

After installation, you can use FFpy to measure the execution time of your Python scripts. Here’s the basic syntax:

ffpy <script_filename> [-ms | -s] [-n <num_runs>]
  • <script_filename>: Replace with the actual filename of your Python script.

  • -ms or -s: Optional flag to specify the time unit (milliseconds or seconds, default is milliseconds).

  • -n <num_runs>: Optional flag to specify the number of runs (default is 1).

Examples

  1. Measure the execution time of a script in milliseconds:

    ffpy my_script.py
  2. Measure the execution time in seconds:

    ffpy my_script.py -s
  3. Run the script 10 times and measure the average execution time:

    ffpy my_script.py -n 10

Contributing

If you’d like to contribute to FFpy, feel free to fork the repository and submit a pull request.

License

This project is licensed under the GPLv3 License - check out this website for more information.

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

FFpy-1.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

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