Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6593883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:44:22+00:00 2026-05-25T17:44:22+00:00

I have a python program that is running for many days. Memory usage does

  • 0

I have a python program that is running for many days. Memory usage does not increase by very much, however the program becomes slower and slower. Is there a tool or utility that will list all function calls and how long they take to complete? Something like guppy/heapy but for CPU usage.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:44:23+00:00Added an answer on May 25, 2026 at 5:44 pm

    Edit2

    I just saw your actual question is answered as in ‘How can you profile a Python script?‘


    Sure, use profile.py.

    import profile
    
    def myfunction():
        bla bla bla
    
    profile.run('myfunction()')
    

    see also profilers and tips on performance.

    Edit:
    Above example is for one function.
    You can profile and run your script from the commandline with cProfile with:

    python -m cProfile myscript.py
    

    Your program/script could look also like the following for profiling always when run:

    def myfunction():
        for i in range(100):
            print(i)
    
    def myotherfunction():
        for i in range(200):
            print(i)
    
    def main():
        """ main program to run over several days """
        for _ in range(3):
            myfunction()
    
        myotherfunction()
    
    if __name__ == '__main__':
        profile.run('main()') # will execute your program
                              # and show profiling results afterwards
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script that ends with running a program (iexpress.exe) in a
I have a python program that is going to eat a lot of memory,
I have a Python program (with Django - does this matter?) that I want
I have a python program that does something like this: Read a row from
I have a Python program that spawns many threads, runs 4 at a time,
I have a Python program running a thread that consistently outputs the following: (my_program.py:12313):
I have a python program running very well. It connects to several websites and
I have a Python program that uses the threading module. Once every second, my
I have a python program that reads floating point values using the following regular
I have a python program that opens several urls in seperate tabs in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.