#pragma once #include #include #include #include #include namespace DB { enum class FilesystemPrefetchState { USED, CANCELLED_WITH_SEEK, CANCELLED_WITH_RANGE_CHANGE, UNNEEDED, }; struct FilesystemReadPrefetchesLogElement { time_t event_time{}; String query_id; String path; UInt64 offset; Int64 size; /// -1 means unknown std::chrono::system_clock::time_point prefetch_submit_time; std::optional execution_watch; Priority priority; FilesystemPrefetchState state; UInt64 thread_id; String reader_id; static std::string name() { return "FilesystemReadPrefetchesLog"; } static NamesAndTypesList getNamesAndTypes(); static NamesAndAliases getNamesAndAliases() { return {}; } void appendToBlock(MutableColumns & columns) const; static const char * getCustomColumnList() { return nullptr; } }; class FilesystemReadPrefetchesLog : public SystemLog { public: using SystemLog::SystemLog; }; using FilesystemReadPrefetchesLogPtr = std::shared_ptr; }