{"library":"profilehooks","title":"profilehooks","description":"A collection of decorators for profiling, timing, and tracing individual functions. Current version 1.13.0, requires Python >=3.7. Release cadence is intermittent, with minor updates.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install profilehooks"],"cli":null},"imports":["from profilehooks import timecall","from profilehooks import profile","from profilehooks import coverage"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from profilehooks import timecall, profile\n\ndef slow_function(n):\n    total = 0\n    for i in range(n):\n        total += i ** 2\n    return total\n\n# Time a single call\n@timecall\ndef timed_slow(n):\n    return slow_function(n)\n\ntimed_slow(100000)\n\n# Profile a function\n@profile\ndef profiled_slow(n):\n    return slow_function(n)\n\nprofiled_slow(100000)","lang":"python","description":"Basic usage of @timecall and @profile decorators.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}