summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-10-19 12:52:21 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-10-19 12:58:27 +0000
commit73a39095ff6bef282d44b4a1296e6578bff54404 (patch)
tree82675f50ebdba980421699f537edb4061a9362b2 /searchcore
parent680a711d800af6c60d87b33388833f3a24081009 (diff)
Use the ExecutorStats type directly.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushengine.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executor_thread_service.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executor_thread_service.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h2
11 files changed, 12 insertions, 16 deletions
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 71ae26180ad..09c782cef07 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -15,7 +15,6 @@
#include <vespa/searchcore/proton/feedoperation/removeoperation.h>
#include <vespa/searchcore/proton/server/blockable_maintenance_job.h>
#include <vespa/searchcore/proton/server/executor_thread_service.h>
-#include <vespa/searchcore/proton/server/i_document_scan_iterator.h>
#include <vespa/searchcore/proton/server/i_operation_storer.h>
#include <vespa/searchcore/proton/server/ibucketmodifiedhandler.h>
#include <vespa/searchcore/proton/server/idocumentmovehandler.h>
@@ -728,7 +727,7 @@ MyExecutor::isIdle()
{
(void) getStats();
sync();
- Stats stats(getStats());
+ auto stats = getStats();
return stats.acceptedTasks == 0u;
}
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.h b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.h
index 068d7bd033c..4eaa722e0ba 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.h
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.h
@@ -114,7 +114,7 @@ public:
*
* @return executor stats
**/
- vespalib::ThreadStackExecutor::Stats getExecutorStats() { return _executor.getStats(); }
+ vespalib::ExecutorStats getExecutorStats() { return _executor.getStats(); }
/**
* Returns the underlying executor. Only used for state explorers.
diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
index 9364fc7b097..74a39a3ec78 100644
--- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
+++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
@@ -62,7 +62,7 @@ public:
*
* @return executor stats
**/
- vespalib::ThreadStackExecutor::Stats getExecutorStats() { return _executor.getStats(); }
+ vespalib::ExecutorStats getExecutorStats() { return _executor.getStats(); }
/**
* Returns the underlying executor. Only used for state explorers.
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
index fa825024878..74e0971178c 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
@@ -5,7 +5,7 @@
namespace proton {
void
-ExecutorMetrics::update(const vespalib::ThreadStackExecutorBase::Stats &stats)
+ExecutorMetrics::update(const vespalib::ExecutorStats &stats)
{
maxPending.set(stats.queueSize.max());
accepted.inc(stats.acceptedTasks);
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
index 5f7dfdf45b0..273c4ed8979 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
@@ -5,7 +5,7 @@
#include <vespa/metrics/metricset.h>
#include <vespa/metrics/countmetric.h>
#include <vespa/metrics/valuemetric.h>
-#include <vespa/vespalib/util/threadstackexecutorbase.h>
+#include <vespa/vespalib/util/executor_stats.h>
namespace proton {
@@ -16,7 +16,7 @@ struct ExecutorMetrics : metrics::MetricSet
metrics::LongCountMetric rejected;
metrics::LongAverageMetric queueSize;
- void update(const vespalib::ThreadStackExecutorBase::Stats &stats);
+ void update(const vespalib::ExecutorStats &stats);
ExecutorMetrics(const std::string &name, metrics::MetricSet *parent);
~ExecutorMetrics();
};
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
index 0a113207f65..e2c53af11b5 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
@@ -11,10 +11,8 @@ namespace proton {
* document db.
*/
class ExecutorThreadingServiceStats {
-public:
- using Stats = vespalib::ExecutorStats;
-
private:
+ using Stats = vespalib::ExecutorStats;
Stats _masterExecutorStats;
Stats _indexExecutorStats;
Stats _summaryExecutorStats;
diff --git a/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.cpp b/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.cpp
index 3b4f12b7c85..684132b34e7 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.cpp
@@ -73,7 +73,7 @@ ExecutorThreadService::isCurrentThread() const
return FastOS_Thread::CompareThreadIds(_threadId->_id, currentThreadId);
}
-vespalib::ThreadExecutor::Stats ExecutorThreadService::getStats() {
+vespalib::ExecutorStats ExecutorThreadService::getStats() {
return _executor.getStats();
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.h b/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.h
index 8adb80889e7..44a330ca696 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.h
+++ b/searchcore/src/vespa/searchcore/proton/server/executor_thread_service.h
@@ -21,7 +21,7 @@ public:
ExecutorThreadService(vespalib::SyncableThreadExecutor &executor);
~ExecutorThreadService();
- Stats getStats() override;
+ vespalib::ExecutorStats getStats() override;
vespalib::Executor::Task::UP execute(vespalib::Executor::Task::UP task) override {
return _executor.execute(std::move(task));
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 17c255d506a..edf68633124 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -737,8 +737,7 @@ Proton::prepareRestart()
namespace {
void
-updateExecutorMetrics(ExecutorMetrics &metrics,
- const vespalib::ThreadStackExecutor::Stats &stats)
+updateExecutorMetrics(ExecutorMetrics &metrics, const vespalib::ExecutorStats &stats)
{
metrics.update(stats);
}
diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.h b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.h
index a439306b69b..34eebdc839d 100644
--- a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.h
+++ b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.h
@@ -66,7 +66,7 @@ public:
*
* @return executor stats
**/
- vespalib::ThreadStackExecutor::Stats getExecutorStats() { return _executor.getStats(); }
+ vespalib::ExecutorStats getExecutorStats() { return _executor.getStats(); }
/**
* Returns the underlying executor. Only used for state explorers.
diff --git a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
index f2e1e64eeb3..26a92841999 100644
--- a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
@@ -40,7 +40,7 @@ public:
}
size_t getNumThreads() const override { return _service.getNumThreads(); }
- Stats getStats() override {
+ vespalib::ExecutorStats getStats() override {
return _service.getStats();
}