2020-09-21 09:40:42 -03:00
|
|
|
/*[clinic input]
|
|
|
|
preserve
|
|
|
|
[clinic start generated code]*/
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_lsprof_Profiler_getstats__doc__,
|
|
|
|
"getstats($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"list of profiler_entry objects.\n"
|
|
|
|
"\n"
|
|
|
|
"getstats() -> list of profiler_entry objects\n"
|
|
|
|
"\n"
|
|
|
|
"Return all information collected by the profiler.\n"
|
|
|
|
"Each profiler_entry is a tuple-like object with the\n"
|
|
|
|
"following attributes:\n"
|
|
|
|
"\n"
|
|
|
|
" code code object\n"
|
|
|
|
" callcount how many times this was called\n"
|
|
|
|
" reccallcount how many times called recursively\n"
|
|
|
|
" totaltime total time in this entry\n"
|
|
|
|
" inlinetime inline time in this entry (not in subcalls)\n"
|
|
|
|
" calls details of the calls\n"
|
|
|
|
"\n"
|
|
|
|
"The calls attribute is either None or a list of\n"
|
|
|
|
"profiler_subentry objects:\n"
|
|
|
|
"\n"
|
|
|
|
" code called code object\n"
|
|
|
|
" callcount how many times this is called\n"
|
|
|
|
" reccallcount how many times this is called recursively\n"
|
|
|
|
" totaltime total time spent in this call\n"
|
|
|
|
" inlinetime inline time (not in further subcalls)");
|
|
|
|
|
|
|
|
#define _LSPROF_PROFILER_GETSTATS_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"getstats", _PyCFunction_CAST(_lsprof_Profiler_getstats), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _lsprof_Profiler_getstats__doc__},
|
2020-09-21 09:40:42 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2020-09-23 07:33:21 -03:00
|
|
|
_lsprof_Profiler_getstats_impl(ProfilerObject *self, PyTypeObject *cls);
|
2020-09-21 09:40:42 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2020-09-23 07:33:21 -03:00
|
|
|
_lsprof_Profiler_getstats(ProfilerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2020-09-21 09:40:42 -03:00
|
|
|
{
|
2024-02-05 16:49:17 -04:00
|
|
|
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
|
2022-04-30 07:15:02 -03:00
|
|
|
PyErr_SetString(PyExc_TypeError, "getstats() takes no arguments");
|
|
|
|
return NULL;
|
2020-09-23 07:33:21 -03:00
|
|
|
}
|
2022-04-30 07:15:02 -03:00
|
|
|
return _lsprof_Profiler_getstats_impl(self, cls);
|
2020-09-21 09:40:42 -03:00
|
|
|
}
|
2024-02-05 16:49:17 -04:00
|
|
|
/*[clinic end generated code: output=5c9d87d89863dc83 input=a9049054013a1b77]*/
|