FuncProfiler Package Documentation
Package documentation for FuncProfiler, a Python library for identifying bottlenecks in code. It includes function profiling, data exports, logging, and line-by-line profiling for more control.
Last updated
Package documentation for FuncProfiler, a Python library for identifying bottlenecks in code. It includes function profiling, data exports, logging, and line-by-line profiling for more control.
Last updated
from funcprofiler import function_profile
# Exporting as `html` with logging enabled
@function_profile(export_format="html", shared_log=True)
def some_function():
return "Hello World."
# Call the function
message = some_function()from funcprofiler import line_by_line_profile
# Logging enabled without exports
@line_by_line_profile(shared_log=True)
def some_complicated_function(n):
total = 0
for i in range(n):
for j in range(i):
total += (i * j) ** 0.5 # Square root calculation
return total
# Call the function
total = some_complicated_function(1000)