Commit d605170f authored by Max Kellermann's avatar Max Kellermann

db/upnp/WorkQueue: remove unused statistics

parent 4734af74
...@@ -82,12 +82,6 @@ class WorkQueue { ...@@ -82,12 +82,6 @@ class WorkQueue {
unsigned int m_clients_waiting; unsigned int m_clients_waiting;
unsigned int m_workers_waiting; unsigned int m_workers_waiting;
// Statistics
unsigned int m_tottasks;
unsigned int m_nowake;
unsigned int m_workersleeps;
unsigned int m_clientsleeps;
public: public:
/** Create a WorkQueue /** Create a WorkQueue
* @param name for message printing * @param name for message printing
...@@ -99,8 +93,7 @@ public: ...@@ -99,8 +93,7 @@ public:
:m_name(name), m_high(hi), m_low(lo), :m_name(name), m_high(hi), m_low(lo),
m_workers_exited(0), m_workers_exited(0),
m_ok(true), m_ok(true),
m_clients_waiting(0), m_workers_waiting(0), m_clients_waiting(0), m_workers_waiting(0)
m_tottasks(0), m_nowake(0), m_workersleeps(0), m_clientsleeps(0)
{ {
} }
...@@ -148,7 +141,6 @@ public: ...@@ -148,7 +141,6 @@ public:
} }
while (ok() && m_high > 0 && m_queue.size() >= m_high) { while (ok() && m_high > 0 && m_queue.size() >= m_high) {
m_clientsleeps++;
// Keep the order: we test ok() AFTER the sleep... // Keep the order: we test ok() AFTER the sleep...
m_clients_waiting++; m_clients_waiting++;
m_ccond.wait(m_mutex); m_ccond.wait(m_mutex);
...@@ -163,8 +155,6 @@ public: ...@@ -163,8 +155,6 @@ public:
if (m_workers_waiting > 0) { if (m_workers_waiting > 0) {
// Just wake one worker, there is only one new task. // Just wake one worker, there is only one new task.
m_wcond.signal(); m_wcond.signal();
} else {
m_nowake++;
} }
return true; return true;
...@@ -242,8 +232,7 @@ public: ...@@ -242,8 +232,7 @@ public:
} }
// Reset to start state. // Reset to start state.
m_workers_exited = m_clients_waiting = m_workers_waiting = m_workers_exited = m_clients_waiting = m_workers_waiting = 0;
m_tottasks = m_nowake = m_workersleeps = m_clientsleeps = 0;
m_ok = true; m_ok = true;
} }
...@@ -261,7 +250,6 @@ public: ...@@ -261,7 +250,6 @@ public:
} }
while (ok() && m_queue.size() < m_low) { while (ok() && m_queue.size() < m_low) {
m_workersleeps++;
m_workers_waiting++; m_workers_waiting++;
if (m_queue.empty()) if (m_queue.empty())
m_ccond.broadcast(); m_ccond.broadcast();
...@@ -278,7 +266,6 @@ public: ...@@ -278,7 +266,6 @@ public:
m_workers_waiting--; m_workers_waiting--;
} }
m_tottasks++;
*tp = m_queue.front(); *tp = m_queue.front();
if (szp) if (szp)
*szp = m_queue.size(); *szp = m_queue.size();
...@@ -286,8 +273,6 @@ public: ...@@ -286,8 +273,6 @@ public:
if (m_clients_waiting > 0) { if (m_clients_waiting > 0) {
// No reason to wake up more than one client thread // No reason to wake up more than one client thread
m_ccond.signal(); m_ccond.signal();
} else {
m_nowake++;
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment