2019-07-10 20:47:39 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Common/ThreadPool.h>
|
|
|
|
|
2020-01-16 12:37:29 +00:00
|
|
|
class StackTrace;
|
|
|
|
|
2019-07-10 20:47:39 +00:00
|
|
|
namespace Poco
|
|
|
|
{
|
|
|
|
class Logger;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class TraceLog;
|
|
|
|
|
|
|
|
class TraceCollector
|
|
|
|
{
|
2020-01-16 12:37:29 +00:00
|
|
|
public:
|
2022-03-13 11:59:20 +00:00
|
|
|
explicit TraceCollector(std::shared_ptr<TraceLog> trace_log_);
|
2020-01-16 12:37:29 +00:00
|
|
|
~TraceCollector();
|
|
|
|
|
2019-07-10 20:47:39 +00:00
|
|
|
private:
|
|
|
|
std::shared_ptr<TraceLog> trace_log;
|
|
|
|
ThreadFromGlobalPool thread;
|
|
|
|
|
|
|
|
void run();
|
2020-02-11 15:16:53 +00:00
|
|
|
void stop();
|
2019-07-10 20:47:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|