diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 7a5771921b..a1d5abff9d 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -4425,6 +4425,29 @@ test_pythread_tss_key_state(PyObject *self, PyObject *args) } +static PyObject * +bench_warn(PyObject *self, PyObject *args) +{ + _PyTime_t t0, dt; + Py_ssize_t loops; + double d; + + if (!PyArg_ParseTuple(args, "n", &loops)) { + return NULL; + } + + t0 = _PyTime_GetPerfCounter(); + for (Py_ssize_t i=0; i