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;
|
|
|
|
|
2023-05-08 23:00:20 +00:00
|
|
|
void tryClosePipe();
|
|
|
|
|
2019-07-10 20:47:39 +00:00
|
|
|
void run();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|