" The patch set is an assorted collection of header cleanups, e.g: * Reduce number of boost includes in header files * Switch to forward declarations in some places A quick measurement was performed to see if these changes provide any improvement in build times (ccache cleaned and existing build products wiped out). The results are posted below (`/usr/bin/time -v ninja dev-build`) for 24 cores/48 threads CPU setup (AMD Threadripper 2970WX). Before: Command being timed: "ninja dev-build" User time (seconds): 28262.47 System time (seconds): 824.85 Percent of CPU this job got: 3979% Elapsed (wall clock) time (h:mm:ss or m:ss): 12:10.97 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 2129888 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1402838 Minor (reclaiming a frame) page faults: 124265412 Voluntary context switches: 1879279 Involuntary context switches: 1159999 Swaps: 0 File system inputs: 0 File system outputs: 11806272 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 After: Command being timed: "ninja dev-build" User time (seconds): 26270.81 System time (seconds): 767.01 Percent of CPU this job got: 3905% Elapsed (wall clock) time (h:mm:ss or m:ss): 11:32.36 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 2117608 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1400189 Minor (reclaiming a frame) page faults: 117570335 Voluntary context switches: 1870631 Involuntary context switches: 1154535 Swaps: 0 File system inputs: 0 File system outputs: 11777280 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 The observed improvement is about 5% of total wall clock time for `dev-build` target. Also, all commits make sure that headers stay self-sufficient, which would help to further improve the situation in the future. " * 'feature/header_cleanups_v1' of https://github.com/ManManson/scylla: transport: remove extraneous `qos/service_level_controller` includes from headers treewide: remove evidently unneded storage_proxy includes from some places service_level_controller: remove extraneous `service/storage_service.hh` include sstables/writer: remove extraneous `service/storage_service.hh` include treewide: remove extraneous database.hh includes from headers treewide: reduce boost headers usage in scylla header files cql3: remove extraneous includes from some headers cql3: various forward declaration cleanups utils: add missing <limits> header in `extremum_tracking.hh`
92 lines
3.0 KiB
C++
92 lines
3.0 KiB
C++
/*
|
|
* Copyright 2016 ScylaDB
|
|
*/
|
|
|
|
/*
|
|
* This file is part of Scylla.
|
|
*
|
|
* Scylla is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Scylla is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <seastar/http/httpd.hh>
|
|
#include <seastar/core/future.hh>
|
|
|
|
#include "database_fwd.hh"
|
|
#include "seastarx.hh"
|
|
|
|
namespace service {
|
|
|
|
class load_meter;
|
|
class storage_proxy;
|
|
|
|
} // namespace service
|
|
|
|
namespace locator {
|
|
|
|
class token_metadata;
|
|
class shared_token_metadata;
|
|
|
|
} // namespace locator
|
|
|
|
namespace cql_transport { class controller; }
|
|
class thrift_controller;
|
|
namespace db { class snapshot_ctl; }
|
|
namespace netw { class messaging_service; }
|
|
class repair_service;
|
|
|
|
namespace api {
|
|
|
|
struct http_context {
|
|
sstring api_dir;
|
|
sstring api_doc;
|
|
httpd::http_server_control http_server;
|
|
distributed<database>& db;
|
|
distributed<service::storage_proxy>& sp;
|
|
service::load_meter& lmeter;
|
|
const sharded<locator::shared_token_metadata>& shared_token_metadata;
|
|
|
|
http_context(distributed<database>& _db,
|
|
distributed<service::storage_proxy>& _sp,
|
|
service::load_meter& _lm, const sharded<locator::shared_token_metadata>& _stm)
|
|
: db(_db), sp(_sp), lmeter(_lm), shared_token_metadata(_stm) {
|
|
}
|
|
|
|
const locator::token_metadata& get_token_metadata();
|
|
};
|
|
|
|
future<> set_server_init(http_context& ctx);
|
|
future<> set_server_config(http_context& ctx);
|
|
future<> set_server_snitch(http_context& ctx);
|
|
future<> set_server_storage_service(http_context& ctx);
|
|
future<> set_server_repair(http_context& ctx, sharded<repair_service>& repair);
|
|
future<> unset_server_repair(http_context& ctx);
|
|
future<> set_transport_controller(http_context& ctx, cql_transport::controller& ctl);
|
|
future<> unset_transport_controller(http_context& ctx);
|
|
future<> set_rpc_controller(http_context& ctx, thrift_controller& ctl);
|
|
future<> unset_rpc_controller(http_context& ctx);
|
|
future<> set_server_snapshot(http_context& ctx, sharded<db::snapshot_ctl>& snap_ctl);
|
|
future<> unset_server_snapshot(http_context& ctx);
|
|
future<> set_server_gossip(http_context& ctx);
|
|
future<> set_server_load_sstable(http_context& ctx);
|
|
future<> set_server_messaging_service(http_context& ctx, sharded<netw::messaging_service>& ms);
|
|
future<> unset_server_messaging_service(http_context& ctx);
|
|
future<> set_server_storage_proxy(http_context& ctx);
|
|
future<> set_server_stream_manager(http_context& ctx);
|
|
future<> set_server_gossip_settle(http_context& ctx);
|
|
future<> set_server_cache(http_context& ctx);
|
|
future<> set_server_done(http_context& ctx);
|
|
|
|
}
|