LCOV - code coverage report
Current view: top level - Modules/clinic - _lsprof.c.h (source / functions) Hit Total Coverage
Test: CPython 3.12 LCOV report [commit acb105a7c1f] Lines: 3 5 60.0 %
Date: 2022-07-20 13:12:14 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /*[clinic input]
       2                 :            : preserve
       3                 :            : [clinic start generated code]*/
       4                 :            : 
       5                 :            : PyDoc_STRVAR(_lsprof_Profiler_getstats__doc__,
       6                 :            : "getstats($self, /)\n"
       7                 :            : "--\n"
       8                 :            : "\n"
       9                 :            : "list of profiler_entry objects.\n"
      10                 :            : "\n"
      11                 :            : "getstats() -> list of profiler_entry objects\n"
      12                 :            : "\n"
      13                 :            : "Return all information collected by the profiler.\n"
      14                 :            : "Each profiler_entry is a tuple-like object with the\n"
      15                 :            : "following attributes:\n"
      16                 :            : "\n"
      17                 :            : "    code          code object\n"
      18                 :            : "    callcount     how many times this was called\n"
      19                 :            : "    reccallcount  how many times called recursively\n"
      20                 :            : "    totaltime     total time in this entry\n"
      21                 :            : "    inlinetime    inline time in this entry (not in subcalls)\n"
      22                 :            : "    calls         details of the calls\n"
      23                 :            : "\n"
      24                 :            : "The calls attribute is either None or a list of\n"
      25                 :            : "profiler_subentry objects:\n"
      26                 :            : "\n"
      27                 :            : "    code          called code object\n"
      28                 :            : "    callcount     how many times this is called\n"
      29                 :            : "    reccallcount  how many times this is called recursively\n"
      30                 :            : "    totaltime     total time spent in this call\n"
      31                 :            : "    inlinetime    inline time (not in further subcalls)");
      32                 :            : 
      33                 :            : #define _LSPROF_PROFILER_GETSTATS_METHODDEF    \
      34                 :            :     {"getstats", _PyCFunction_CAST(_lsprof_Profiler_getstats), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _lsprof_Profiler_getstats__doc__},
      35                 :            : 
      36                 :            : static PyObject *
      37                 :            : _lsprof_Profiler_getstats_impl(ProfilerObject *self, PyTypeObject *cls);
      38                 :            : 
      39                 :            : static PyObject *
      40                 :         18 : _lsprof_Profiler_getstats(ProfilerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
      41                 :            : {
      42         [ -  + ]:         18 :     if (nargs) {
      43                 :          0 :         PyErr_SetString(PyExc_TypeError, "getstats() takes no arguments");
      44                 :          0 :         return NULL;
      45                 :            :     }
      46                 :         18 :     return _lsprof_Profiler_getstats_impl(self, cls);
      47                 :            : }
      48                 :            : /*[clinic end generated code: output=0615a53cce828f06 input=a9049054013a1b77]*/

Generated by: LCOV version 1.14