Documentation
Our WebsiteOur Github
  • 👋Welcome to Infinitode Documentation
  • AI Documentation
  • API Documentation
    • Basic Math API Documentation (#Experimental)
    • BMI Calculator API Documentation
    • Character Counter API Documentation
    • Chemical Equation Balancer API Documentation
    • Color Generator API Documentation
    • Date Difference Calculator API Documentation
    • Dungen API Documentation
    • Dungen Dev API Documentation
    • Factorial Calculator API Documentation
    • Fantasy Name Generator API Documentation
    • Fibonacci Sequence Generator API Documentation
    • GCD Calculator API Documentation
    • Hash API Documentation
    • Helix PSA API Documentation
    • LCM Calculator API Documentation
    • Leap Year Checker API Documentation
    • Lorem API Documentation
    • Molar Mass Calculator API Documentation (#Experimental)
    • MycoNom API Documentation
    • Name Generator API Documentation
    • Palindrome Checker API Documentation
    • Password Generator API Documentation
    • Password Strength Detector API Documentation
    • Periodic Table API Documentation
    • Prime Number Checker API Documentation
    • Quadratic Equation Solver API Documentation
    • Random Facts Generator API Documentation
    • Random Quotes Generator API Documentation
    • Roman Numeral Converter API Documentation
    • Simple Interest Calculator API Documentation
    • Slugify API Documentation
    • Text Case Converter API Documentation
    • Unit Converter API Documentation
    • Username Generator API Documentation
    • UUID Generator API Documentation
    • Vowel Counter API Documentation
  • Package Documentation
    • BlurJS Package Documentation
      • BlurJS Usage Examples
      • BlurJS Reference Documentation
    • CodeSafe Package Documentation
      • CodeSafe Reference
        • CodeSafe Functions
    • DeepDefend Package Documentation
      • DeepDefend Reference
        • Attacks Functions
        • Defenses Functions
    • DupliPy Package Documentation
      • DupliPy Reference
        • Formatting Functions
        • Replication Functions
        • Similarity Functions
        • Text Analysis Functions
    • FuncProfiler Package Documentation
      • FuncProfiler Reference
        • FuncProfiler Functions
    • Hued Package Documentation
      • Hued Reference
        • Analysis Functions
        • Colors Functions
        • Conversions Functions
        • Palettes Functions
    • LocalSiteMap Package Documentation
      • LocalSiteMap Reference
        • LocalSiteMap Functions
    • PyAutoPlot Package Documentation
      • PyAutoPlot Reference
        • PyAutoPlot Functions
    • PyWebScrapr Package Documentation
      • PyWebScrapr Reference
        • PyWebScrapr Functions
    • ValX Package Documentation
      • ValX Reference
        • ValX Functions
Powered by GitBook
On this page
  • Function profile
  • Line-by-line profile

Was this helpful?

  1. Package Documentation
  2. FuncProfiler Package Documentation
  3. FuncProfiler Reference

FuncProfiler Functions

PreviousFuncProfiler ReferenceNextHued Package Documentation

Last updated 2 months ago

Was this helpful?

Available functions:

  • (export_format: Optional[str] = None, filename: Optional[str] = None, shared_log: bool = False): Decorator factory to profile the execution time and memory usage of a function with optional data export and shared logging.

  • (export_format: Optional[str] = None, filename: Optional[str] = None, shared_log: bool = False): Decorator for line-by-line profiling of a function with optional data export and shared logging.


Function profile

Decorator factory to profile the execution time and memory usage of a function with optional data export and shared logging.

Args:
        export_format (Optional[str]): The format to export the profiling data ('txt', 'json', 'csv', 'html', 'xml', 'md').
        filename (Optional[str]): The name of the output file (without extension).
        shared_log (Optional[bool]): If True, log to a shared file for all profiled functions.

Returns:
        Callable: The profiling wrapper or decorator function.

Available values for Function profile:

  • export_format: json, txt, csv, html, xml, md (str)

  • filename: any (str)

  • shared_log: True/False (Boolean)

All arguments are Optional, but the decorator should still be accompanied by ():

@function_profile()
def someFunctionToProfile():

If no () was passed along with the decorator, you will receive a missing required positional parameter func error from Python.

Line-by-line profile

Decorator for line-by-line profiling of a function with optional data export and shared logging.

Args:
        export_format (Optional[str]): The format to export the profiling data ('json', 'csv', 'html', 'xml', 'md').
        filename (Optional[str]): The name of the output file (without extension).
        shared_log (Optional[bool]): If True, log to a shared file for all profiled functions.

Returns:
        Callable: The profiling wrapper or decorator function.

Available values for Line-by-line profile:

  • export_format: json, csv, html, xml, md (str)

  • filename: any (str)

  • shared_log: True/False (Boolean)

All arguments are Optional, but the decorator should still be accompanied by ():

@line_by_line_profile()
def someFunctionToProfile():

If no () was passed along with the decorator, you will receive a missing required positional parameter func error from Python.

function_profile
line_by_line_profile