From 8a3844f29e18fa88ea4cb6a3d4f035a47fb2eb6a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 17 Apr 2013 12:18:39 -0400 Subject: [PATCH] README: Explain what this test is for and how it works --- README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..bed242e --- /dev/null +++ b/README @@ -0,0 +1,19 @@ +Test processing distribution on a multicore system using +``Py_BEGIN_ALLOW_THREADS`` and ``threading.Thread``. + +Build with:: + + $ python setup.py build + +Test the time with:: + + $ time PYTHONPATH=build/lib.linux-x86_64-3.2/ ./grab-cores.py 2 + + real 0m10.075s + user 0m18.364s + sys 0m0.029s + +You may need to tweak the ``PYTHONPATH`` to match the build directory +for your system. The results shown are for my two-core system. +During the run, ``top`` showed the process pegged around 195% of the +CPU, so we are actually using all the available horsepower. -- 2.26.2