The latter is recommended in seastar, and the former was left as
compatibility alias. Latest seastar explicitly marks it as deprecated so
once the submodule is updated, compilation logs will explode.
Most of the patch is generated with
for f in $(git grep -l '\<distributed<[A-Za-z0-9:_]*>') ; do sed -e 's/\<distributed<\([A-Za-z0-9:_]*\)>/sharded<\1>/g' -i $f; done
for f in $(git grep -l distributed.hh); do sed -e 's/distributed.hh/sharded.hh/' -i $f ; done
and a small manual change in test/perf/perf.hh
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Closes scylladb/scylladb#26136
39 lines
623 B
C++
39 lines
623 B
C++
/*
|
|
* Copyright (C) 2020-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/sharded.hh>
|
|
#include "service/load_broadcaster.hh"
|
|
|
|
using namespace seastar;
|
|
|
|
namespace replica {
|
|
class database;
|
|
}
|
|
|
|
namespace gms { class gossiper; }
|
|
|
|
namespace service {
|
|
|
|
class load_meter {
|
|
private:
|
|
shared_ptr<load_broadcaster> _lb;
|
|
|
|
/** raw load value */
|
|
double get_load() const;
|
|
|
|
public:
|
|
future<std::map<sstring, double>> get_load_map();
|
|
|
|
future<> init(sharded<replica::database>& db, gms::gossiper& gossiper);
|
|
future<> exit();
|
|
};
|
|
|
|
}
|