ClickHouse/dbms/Storages/System/StorageSystemAsynchronousMetrics.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

34 lines
1001 B
C++

#pragma once
#include <ext/shared_ptr_helper.h>
#include <Storages/System/IStorageSystemOneBlock.h>
namespace DB
{
class AsynchronousMetrics;
class Context;
/** Implements system table asynchronous_metrics, which allows to get values of periodically (asynchronously) updated metrics.
*/
class StorageSystemAsynchronousMetrics final : public ext::shared_ptr_helper<StorageSystemAsynchronousMetrics>,
public IStorageSystemOneBlock<StorageSystemAsynchronousMetrics>
{
friend struct ext::shared_ptr_helper<StorageSystemAsynchronousMetrics>;
public:
std::string getName() const override { return "SystemAsynchronousMetrics"; }
static NamesAndTypesList getNamesAndTypes();
private:
const AsynchronousMetrics & async_metrics;
protected:
StorageSystemAsynchronousMetrics(const std::string & name_, const AsynchronousMetrics & async_metrics_);
void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override;
};
}