Metadata-Version: 2.0
Name: func-profile-decor
Version: 0.1.1
Summary: Profile a function using a simple decorator
Home-page: https://github.com/asanoryu/function_profile
Author: Vladislav Shumanov
Author-email: vl.shumanov@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/x-rst
Requires-Dist: memory-profiler

**function_profile decorator**

Provides decorator for time and memory profiling of functions.

Metrics:

* time - time for a single function call
* memory -  peak memory used by the function. The peak memory is the difference between the starting minimum value, and the highest value.


Usage:

.. code-block:: python

    from function_profile import profile

    @profile(time_prof=True, mem_prof=True)
    def factoriel_loop(n: int) -> int:
        """Calculate factoriel non-recursive."""
        fac: int = 1
        for i in range(1, n + 1):
            fac = fac * i
        return fac

    factoriel_loop(n=100)

Output:

    factoriel_loop(, n=100)

    Time   0.00001450

    Memory 0.0546875


