| 120 | } |
| 121 | |
| 122 | DB::Block getSampleBlock() |
| 123 | { |
| 124 | using namespace DB; |
| 125 | static const NamesAndTypesList column_names_and_types = { |
| 126 | {"host_name", std::make_shared<DataTypeString>()}, |
| 127 | {"current_time", std::make_shared<DataTypeDateTime>()}, |
| 128 | {"thread_id", std::make_shared<DataTypeUInt64>()}, |
| 129 | {"type", TypeEnum}, |
| 130 | {"name", std::make_shared<DataTypeString>()}, |
| 131 | {"value", std::make_shared<DataTypeInt64>()}, |
| 132 | }; |
| 133 | |
| 134 | ColumnsWithTypeAndName temp_columns; |
| 135 | for (auto const & name_and_type : column_names_and_types) |
| 136 | temp_columns.emplace_back(name_and_type.type, name_and_type.name); |
| 137 | |
| 138 | return Block(std::move(temp_columns)); |
| 139 | } |
| 140 | |
| 141 | DB::Block getProfileEvents( |
| 142 | const String & host_name, |
no test coverage detected