Rename "common" to "base"

This commit is contained in:
Alexey Milovidov 2021-10-02 10:13:14 +03:00
parent 93a11d7444
commit fe6b7c77c7
1072 changed files with 1275 additions and 1275 deletions

View File

@ -2,7 +2,7 @@ if (USE_CLANG_TIDY)
set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}") set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}")
endif () endif ()
add_subdirectory (common) add_subdirectory (base)
add_subdirectory (daemon) add_subdirectory (daemon)
add_subdirectory (loggers) add_subdirectory (loggers)
add_subdirectory (pcg-random) add_subdirectory (pcg-random)

View File

@ -6,8 +6,8 @@
#include <mutex> #include <mutex>
#include <condition_variable> #include <condition_variable>
#include <common/defines.h> #include <base/defines.h>
#include <common/MoveOrCopyIfThrow.h> #include <base/MoveOrCopyIfThrow.h>
/** Pool for limited size objects that cannot be used from different threads simultaneously. /** Pool for limited size objects that cannot be used from different threads simultaneously.
* The main use case is to have fixed size of objects that can be reused in difference threads during their lifetime * The main use case is to have fixed size of objects that can be reused in difference threads during their lifetime

View File

@ -3,7 +3,7 @@
#include <cctz/civil_time.h> #include <cctz/civil_time.h>
#include <cctz/time_zone.h> #include <cctz/time_zone.h>
#include <cctz/zone_info_source.h> #include <cctz/zone_info_source.h>
#include <common/getResource.h> #include <base/getResource.h>
#include <Poco/Exception.h> #include <Poco/Exception.h>
#include <algorithm> #include <algorithm>

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <common/types.h> #include <base/types.h>
#include <common/strong_typedef.h> #include <base/strong_typedef.h>
/** Represents number of days since 1970-01-01. /** Represents number of days since 1970-01-01.
* See DateLUTImpl for usage examples. * See DateLUTImpl for usage examples.

View File

@ -3,7 +3,7 @@
#include <cstdint> #include <cstdint>
#include <cstddef> #include <cstddef>
#include <cstring> #include <cstring>
#include <common/extended_types.h> #include <base/extended_types.h>
/// Allows to check the internals of IEEE-754 floating point number. /// Allows to check the internals of IEEE-754 floating point number.

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <Poco/ErrorHandler.h> #include <Poco/ErrorHandler.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <Common/Exception.h> #include <Common/Exception.h>

View File

@ -3,9 +3,9 @@
#include <Poco/UTF8Encoding.h> #include <Poco/UTF8Encoding.h>
#include <Poco/NumberParser.h> #include <Poco/NumberParser.h>
#include <common/JSON.h> #include <base/JSON.h>
#include <common/find_symbols.h> #include <base/find_symbols.h>
#include <common/preciseExp10.h> #include <base/preciseExp10.h>
#include <iostream> #include <iostream>

View File

@ -2,8 +2,8 @@
#include <typeinfo> #include <typeinfo>
#include <Poco/Exception.h> #include <Poco/Exception.h>
#include <common/StringRef.h> #include <base/StringRef.h>
#include <common/types.h> #include <base/types.h>
/** Очень простой класс для чтения JSON (или его кусочков). /** Очень простой класс для чтения JSON (или его кусочков).

View File

@ -1,4 +1,4 @@
#include <common/LineReader.h> #include <base/LineReader.h>
#include <iostream> #include <iostream>
#include <string_view> #include <string_view>

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <common/types.h> #include <base/types.h>
#include <atomic> #include <atomic>
#include <vector> #include <vector>

View File

@ -4,7 +4,7 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <exception> #include <exception>
#include <common/DateLUT.h> #include <base/DateLUT.h>
/** Stores a calendar date in broken-down form (year, month, day-in-month). /** Stores a calendar date in broken-down form (year, month, day-in-month).

View File

@ -3,8 +3,8 @@
#include <string> #include <string>
#include <iomanip> #include <iomanip>
#include <exception> #include <exception>
#include <common/DateLUT.h> #include <base/DateLUT.h>
#include <common/LocalDate.h> #include <base/LocalDate.h>
/** Stores calendar date and time in broken-down form. /** Stores calendar date and time in broken-down form.

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <common/types.h> #include <base/types.h>
namespace detail namespace detail
{ {

View File

@ -1,6 +1,6 @@
#include <common/ReadlineLineReader.h> #include <base/ReadlineLineReader.h>
#include <common/errnoToString.h> #include <base/errnoToString.h>
#include <common/scope_guard.h> #include <base/scope_guard.h>
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>

View File

@ -1,5 +1,5 @@
#include <common/ReplxxLineReader.h> #include <base/ReplxxLineReader.h>
#include <common/errnoToString.h> #include <base/errnoToString.h>
#include <chrono> #include <chrono>
#include <cerrno> #include <cerrno>

View File

@ -3,7 +3,7 @@
#include <map> #include <map>
#include <tuple> #include <tuple>
#include <mutex> #include <mutex>
#include <common/function_traits.h> #include <base/function_traits.h>
/** The simplest cache for a free function. /** The simplest cache for a free function.

View File

@ -7,8 +7,8 @@
#include <functional> #include <functional>
#include <iosfwd> #include <iosfwd>
#include <common/types.h> #include <base/types.h>
#include <common/unaligned.h> #include <base/unaligned.h>
#include <city.h> #include <city.h>

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <common/extended_types.h> #include <base/extended_types.h>
#include <common/defines.h> #include <base/defines.h>
namespace common namespace common

View File

@ -8,7 +8,7 @@
/// NOTE: /// NOTE:
/// - __has_feature cannot be simply undefined, /// - __has_feature cannot be simply undefined,
/// since this will be broken if some C++ header will be included after /// since this will be broken if some C++ header will be included after
/// including <common/defines.h> /// including <base/defines.h>
/// - it should not have fallback to 0, /// - it should not have fallback to 0,
/// since this may create false-positive detection (common problem) /// since this may create false-positive detection (common problem)
#if defined(__clang__) && defined(__has_feature) #if defined(__clang__) && defined(__has_feature)

View File

@ -1,4 +1,4 @@
#include <common/demangle.h> #include <base/demangle.h>
#if defined(_MSC_VER) #if defined(_MSC_VER)

View File

@ -2,8 +2,8 @@
#include <type_traits> #include <type_traits>
#include <common/types.h> #include <base/types.h>
#include <common/wide_integer.h> #include <base/wide_integer.h>
using Int128 = wide::integer<128, signed>; using Int128 = wide::integer<128, signed>;

View File

@ -1,5 +1,5 @@
#include <Poco/Net/DNS.h> #include <Poco/Net/DNS.h>
#include <common/getFQDNOrHostName.h> #include <base/getFQDNOrHostName.h>
namespace namespace

View File

@ -1,4 +1,4 @@
#include <common/getThreadId.h> #include <base/getThreadId.h>
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include <sys/types.h> #include <sys/types.h>

View File

@ -30,7 +30,7 @@
#include <cstddef> #include <cstddef>
#include <cstring> #include <cstring>
#include <type_traits> #include <type_traits>
#include <common/extended_types.h> #include <base/extended_types.h>
namespace impl namespace impl

View File

@ -1,4 +1,4 @@
#include <common/mremap.h> #include <base/mremap.h>
#include <cstddef> #include <cstddef>
#include <cstdlib> #include <cstdlib>

View File

@ -4,7 +4,7 @@
/// This code was based on the code by Fedor Korotkiy (prime@yandex-team.ru) for YT product in Yandex. /// This code was based on the code by Fedor Korotkiy (prime@yandex-team.ru) for YT product in Yandex.
#include <common/defines.h> #include <base/defines.h>
#if defined(__linux__) && !defined(THREAD_SANITIZER) #if defined(__linux__) && !defined(THREAD_SANITIZER)
#define USE_PHDR_CACHE 1 #define USE_PHDR_CACHE 1

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <common/scope_guard.h> #include <base/scope_guard.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <Common/MemoryTracker.h> #include <Common/MemoryTracker.h>
/// Same as SCOPE_EXIT() but block the MEMORY_LIMIT_EXCEEDED errors. /// Same as SCOPE_EXIT() but block the MEMORY_LIMIT_EXCEEDED errors.

View File

@ -1,5 +1,5 @@
#include <common/setTerminalEcho.h> #include <base/setTerminalEcho.h>
#include <common/errnoToString.h> #include <base/errnoToString.h>
#include <stdexcept> #include <stdexcept>
#include <cstring> #include <cstring>
#include <string> #include <string>

View File

@ -1,4 +1,4 @@
#include <common/shift10.h> #include <base/shift10.h>
#include "defines.h" #include "defines.h"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <common/types.h> #include <base/types.h>
/** Almost the same as x = x * exp10(exponent), but gives more accurate result. /** Almost the same as x = x * exp10(exponent), but gives more accurate result.
* Example: * Example:

View File

@ -1,5 +1,5 @@
#include <string> #include <string>
#include <common/terminalColors.h> #include <base/terminalColors.h>
std::string setColor(UInt64 hash) std::string setColor(UInt64 hash)

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <string> #include <string>
#include <common/types.h> #include <base/types.h>
/** Set color in terminal based on 64-bit hash value. /** Set color in terminal based on 64-bit hash value.

View File

@ -1,4 +1,4 @@
#include <common/iostream_debug_helpers.h> #include <base/iostream_debug_helpers.h>
#include <iostream> #include <iostream>
#include <memory> #include <memory>

View File

@ -4,12 +4,12 @@
#include <Poco/Net/NetException.h> #include <Poco/Net/NetException.h>
#include <Poco/Util/HelpFormatter.h> #include <Poco/Util/HelpFormatter.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <common/range.h> #include <base/range.h>
#include <Common/StringUtils/StringUtils.h> #include <Common/StringUtils/StringUtils.h>
#include <Common/SensitiveDataMasker.h> #include <Common/SensitiveDataMasker.h>
#include <common/errnoToString.h> #include <base/errnoToString.h>
#include <IO/ReadHelpers.h> #include <IO/ReadHelpers.h>
#include <Formats/registerFormats.h> #include <Formats/registerFormats.h>
#include <Server/HTTP/HTTPServer.h> #include <Server/HTTP/HTTPServer.h>

View File

@ -25,7 +25,7 @@
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <memory> #include <memory>
#include <common/scope_guard.h> #include <base/scope_guard.h>
#include <Poco/Observer.h> #include <Poco/Observer.h>
#include <Poco/AutoPtr.h> #include <Poco/AutoPtr.h>
@ -38,12 +38,12 @@
#include <Poco/SyslogChannel.h> #include <Poco/SyslogChannel.h>
#include <Poco/DirectoryIterator.h> #include <Poco/DirectoryIterator.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <common/ErrorHandlers.h> #include <base/ErrorHandlers.h>
#include <common/argsToConfig.h> #include <base/argsToConfig.h>
#include <common/getThreadId.h> #include <base/getThreadId.h>
#include <common/coverage.h> #include <base/coverage.h>
#include <common/sleep.h> #include <base/sleep.h>
#include <IO/WriteBufferFromFile.h> #include <IO/WriteBufferFromFile.h>
#include <IO/WriteBufferFromFileDescriptorDiscardOnFailure.h> #include <IO/WriteBufferFromFileDescriptorDiscardOnFailure.h>

View File

@ -16,9 +16,9 @@
#include <Poco/Util/ServerApplication.h> #include <Poco/Util/ServerApplication.h>
#include <Poco/Net/SocketAddress.h> #include <Poco/Net/SocketAddress.h>
#include <Poco/Version.h> #include <Poco/Version.h>
#include <common/types.h> #include <base/types.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <common/getThreadId.h> #include <base/getThreadId.h>
#include <daemon/GraphiteWriter.h> #include <daemon/GraphiteWriter.h>
#include <Common/Config/ConfigProcessor.h> #include <Common/Config/ConfigProcessor.h>
#include <Common/StatusFile.h> #include <Common/StatusFile.h>

View File

@ -2,7 +2,7 @@
#include <daemon/BaseDaemon.h> #include <daemon/BaseDaemon.h>
#include <Poco/Util/LayeredConfiguration.h> #include <Poco/Util/LayeredConfiguration.h>
#include <Poco/Util/Application.h> #include <Poco/Util/Application.h>
#include <common/getFQDNOrHostName.h> #include <base/getFQDNOrHostName.h>
#include <mutex> #include <mutex>
#include <iomanip> #include <iomanip>

View File

@ -5,7 +5,7 @@
#include <Poco/Net/StreamSocket.h> #include <Poco/Net/StreamSocket.h>
#include <Poco/Net/SocketStream.h> #include <Poco/Net/SocketStream.h>
#include <Poco/Util/Application.h> #include <Poco/Util/Application.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
/// пишет в Graphite данные в формате /// пишет в Graphite данные в формате

View File

@ -3,10 +3,10 @@
#include <Poco/Util/Application.h> #include <Poco/Util/Application.h>
#include <Poco/Util/LayeredConfiguration.h> #include <Poco/Util/LayeredConfiguration.h>
#include <common/defines.h> #include <base/defines.h>
#include <common/getFQDNOrHostName.h> #include <base/getFQDNOrHostName.h>
#include <common/getMemoryAmount.h> #include <base/getMemoryAmount.h>
#include <common/logger_useful.h> #include <base/logger_useful.h>
#include <Common/formatReadable.h> #include <Common/formatReadable.h>
#include <Common/SymbolIndex.h> #include <Common/SymbolIndex.h>

View File

@ -3,7 +3,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <Common/CurrentThread.h> #include <Common/CurrentThread.h>
#include <Common/Exception.h> #include <Common/Exception.h>
#include <common/getThreadId.h> #include <base/getThreadId.h>
namespace DB namespace DB

View File

@ -8,8 +8,8 @@
#include <Common/HashTable/Hash.h> #include <Common/HashTable/Hash.h>
#include <Interpreters/InternalTextLogsQueue.h> #include <Interpreters/InternalTextLogsQueue.h>
#include <Common/CurrentThread.h> #include <Common/CurrentThread.h>
#include <common/getThreadId.h> #include <base/getThreadId.h>
#include <common/terminalColors.h> #include <base/terminalColors.h>
#include "Loggers.h" #include "Loggers.h"

View File

@ -9,7 +9,7 @@
#include <Poco/Message.h> #include <Poco/Message.h>
#include <Common/CurrentThread.h> #include <Common/CurrentThread.h>
#include <Common/DNSResolver.h> #include <Common/DNSResolver.h>
#include <common/getThreadId.h> #include <base/getThreadId.h>
#include <Common/SensitiveDataMasker.h> #include <Common/SensitiveDataMasker.h>
#include <Common/IO.h> #include <Common/IO.h>

View File

@ -7,7 +7,7 @@
#endif #endif
#include <mysqlxx/Pool.h> #include <mysqlxx/Pool.h>
#include <common/sleep.h> #include <base/sleep.h>
#include <Poco/Util/LayeredConfiguration.h> #include <Poco/Util/LayeredConfiguration.h>
#include <ctime> #include <ctime>

Some files were not shown because too many files have changed in this diff Show More