Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Script/Function Runtime Calculation Module 鈴憋笍馃悕 #21

Closed
bhargavnova opened this issue Oct 3, 2023 · 4 comments 路 Fixed by #22
Closed

Python Script/Function Runtime Calculation Module 鈴憋笍馃悕 #21

bhargavnova opened this issue Oct 3, 2023 · 4 comments 路 Fixed by #22
Assignees
Labels
example Either work on this example or submit something of your own hacktoberfest Hacktoberfest 2023 contributions hacktoberfest-2023 Hacktoberfest 2023 contributions accepted python python-module Python utility/resuable module, which can be imported in different scripts

Comments

@bhargavnova
Copy link
Owner

Objective:

Create a Python module that allows users to calculate the run time of a specific function or an entire script. This module will help users analyze the performance of their code.

Features:

  1. Function Runtime Measurement:

    • Implement functionality to measure the execution time of a specific function.
  2. Script Runtime Measurement:

    • Provide the ability to measure the overall execution time of an entire Python script.
  3. User-Friendly Output:

    • Display the calculated run time in a human-readable format (e.g., seconds, milliseconds, etc.).

Example Usage:

# Example usage of the runtime calculation module
import runtime_calculator

# Measure the runtime of a function
@runtime_calculator.measure_runtime
def my_function():
    # Function code here
    pass

# Call the function
my_function()

# Measure the runtime of the entire script
if __name__ == "__main__":
    runtime_calculator.measure_script_runtime()

Difficulty: Intermediate

Tags: Python, Performance Analysis, Run Time Measurement, Profiling

Additional Information:

  • Familiarity with Python functions and modules is recommended for contributors interested in this task.
  • Consider using the time module for measuring run time.
@bhargavnova bhargavnova added hacktoberfest Hacktoberfest 2023 contributions python example Either work on this example or submit something of your own hacktoberfest-2023 Hacktoberfest 2023 contributions accepted python-module Python utility/resuable module, which can be imported in different scripts labels Oct 3, 2023
@Namatuzio
Copy link
Contributor

Hi, I'll gladly tackle this issue!

@bhargavnova
Copy link
Owner Author

Sure!!
Just note a few things,

  1. only one pull request per issue is allowed.
  2. add README.md file with documentation.

Thanks : )
Happy Coding!!

@bhargavnova
Copy link
Owner Author

Hi @Namatuzio,
Fantastic job! Your contribution is invaluable.

I encourage you to continue exploring and contributing to the repo. Your skills and perspective are a valuable addition to this community.

Once again, thank you for your time, effort, and enthusiasm. We look forward to more collaborations in the future!

Warm regards,

@Namatuzio
Copy link
Contributor

Thank you for the opportunity! I had a blast implementing the module!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Either work on this example or submit something of your own hacktoberfest Hacktoberfest 2023 contributions hacktoberfest-2023 Hacktoberfest 2023 contributions accepted python python-module Python utility/resuable module, which can be imported in different scripts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants