blob: 07f22bea8777932ce1ffc9dda01f715c77efe444 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "executor_threading_service_explorer.h"
#include "executor_explorer_utils.h"
#include "executorthreadingservice.h"
#include <vespa/vespalib/data/slime/cursor.h>
namespace proton {
using explorer::convert_executor_to_slime;
ExecutorThreadingServiceExplorer::ExecutorThreadingServiceExplorer(searchcorespi::index::IThreadingService& service)
: _service(service)
{
}
ExecutorThreadingServiceExplorer::~ExecutorThreadingServiceExplorer() = default;
void
ExecutorThreadingServiceExplorer::get_state(const vespalib::slime::Inserter& inserter, bool full) const
{
auto& object = inserter.insertObject();
if (full) {
convert_executor_to_slime(&_service.master(), object.setObject("master"));
convert_executor_to_slime(&_service.index(), object.setObject("index"));
convert_executor_to_slime(&_service.summary(), object.setObject("summary"));
convert_executor_to_slime(&_service.field_writer(), object.setObject("field_writer"));
}
}
}
|