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)(void(*)(void))_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 *
_lsprof_Profiler_getstats(ProfilerObject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)40 _lsprof_Profiler_getstats(ProfilerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
41 {
42 PyObject *return_value = NULL;
43 static const char * const _keywords[] = { NULL};
44 static _PyArg_Parser _parser = {":getstats", _keywords, 0};
45
46 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
47 )) {
48 goto exit;
49 }
50 return_value = _lsprof_Profiler_getstats_impl(self, cls);
51
52 exit:
53 return return_value;
54 }
55 /*[clinic end generated code: output=b4727cfebecdd22d input=a9049054013a1b77]*/
56