summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2020-09-13 07:19:53 +1000
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2020-09-13 07:19:53 +1000
commitcc4a7ed8f86f5a9e556de7555f11ce0559f15215 (patch)
tree1936418914853cfbf49696bf84fbf337f9c5c6f0 /src
parentf0ff4d43a1148da6da6e17236fbb662d23b92cdb (diff)
downloadmod_wsgi-cc4a7ed8f86f5a9e556de7555f11ce0559f15215.tar.gz
CPU usage can actually go over 1 in some cases when have multiple CPUs available.
Diffstat (limited to 'src')
-rw-r--r--src/server/wsgi_metrics.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/server/wsgi_metrics.c b/src/server/wsgi_metrics.c
index 2f83f19..9b28ea2 100644
--- a/src/server/wsgi_metrics.c
+++ b/src/server/wsgi_metrics.c
@@ -480,17 +480,6 @@ static PyObject *wsgi_request_metrics(void)
total_cpu_time += cpu_user_time;
total_cpu_time += cpu_system_time;
- /*
- * This can add up to just over 1.0 because of time do things. In
- * this case force it back into range 0 to 1.0. The chart will be
- * capped at 1.0 anyway.
- */
-
- if (total_cpu_time > 1.0) {
- cpu_user_time = cpu_user_time / total_cpu_time;
- cpu_system_time = cpu_system_time / total_cpu_time;
- }
-
object = PyFloat_FromDouble(cpu_user_time);
PyDict_SetItem(result,
WSGI_INTERNED_STRING(cpu_user_time), object);