aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Do not use minilzo and quicklz in open source. Export it to github.iddqd2024-06-1031-0/+1523
| | | | | | | | d4d08d59dfff0c48a950a3faa36be4ac7e060912
| * Add TCaseInsensitiveAsciiStringvadim-xd2024-06-0913-63/+356
| | | | | | | | | | Followup for rXXXXXX - further optimize ascii-only case insensitive strings 1fca7889a074a191eadce12247bdd6dd18b75ab2
| * Revert commit rXXXXXX, temporary add ↵iddqd2024-06-0722-1386/+0
| | | | | | | | | | | | library/cpp/streams/factory/open_by_signature to export 6c14e61e6b845e2aa92a25daf61de10267e9e8a0
| * YT-21868: Refactor NYT::Formatarkady-e1ppa2024-06-0724-699/+1075
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NYT::Format had several problems: 1. There are too many ways to enable printing of T. Not all are equally good. You could specialize TValueFormatter, you could write an overload of FormatValue, you could write an overload of ToString, you could write an overload of operator << for special stream or you could specialize the Out function. 2. If you attempt to print T which cannot be printed, you get a linker error without a proper source location which is very frustrating to work with. 3. There is no static analysis of format string performed even when it is possible. 4. If you write FormatValue overload, you still have to write ToString overload if you want to use this function (and people tend to use it quite a bit, since it is defined for util types and enums. This pr addresses these issues to some extent. Relevant changes: 1. The only way to support NYT::Format is to define the FormatValue overload. Otherwise, you get a compile-time error. 2. Format overloads have changed: Now you have two options for general use: ``` TString Format(TStaticFormat<TArgs...> fmt, TArgs&&... args); TString Format(TRuntimeFormat fmt, TArgs&&... args); ``` Either overload checks if TArg has a FormatValue overload. TStaticFormat performs a compile-time check of flags and the argument count. It binds to any string literal and constexpr string/string_view (and TStringBuf). TRuntimeFormat has to be mentioned explicitly. Otherwise, you will get a compile-time error for using runtime variable as a format. 3(!!!). Types which name begins with NYT:: have a specialization of ToString function which uses FormatValue. Thus, if you write class in namespace NYT and define FormatValue, you get ToString automatically. If your type is not from namespace enclosing NYT, you can just call NYT::ToString for the same effect. This limitation was caused by the fact, that we cannot review all of the external projects code which might inherit from stl classes or adopt some other questionable code practises which may completely break the dispatching mechanism of ToString due to the specialization (there were such cases). Proper documentation of this library will be added soon, so that this interaction is made known. This limitation might be lifted later 77beb68082e10aaf48be1842aad8aba63f26c1bd
| * add GetOrNull method to threadsafe cacheivanmautin2024-06-062-0/+31
| | | | | | | | 2c3ce3e36d35b563fe21b581380310ac84007f57
| * add TThreadSafeLRUCacheWithSizeProvider wrapperivanmautin2024-06-062-0/+308
| | | | | | | | | | | | На данный момент никак нельзя создать thread-safe кэш с произвольным SizeProvider, из-за того, что это не позволяет сделать шаблон `TThreadSafeCache`, при этом отредактировтаь его тоже не удастся, так как для этого нужно передать дополнительный параметр `typename TSizeProvider`, что сломает обратную совместимость, так как шаблон принимает далее переменное число аргументов (см. [TThreadSafeCache](https://a.yandex-team.ru/arcadia/library/cpp/cache/thread_safe_cache.h?rev=rXXXXXX#L15)) В связи с этим добавлен еще один хелпер, для создания LRUCache с TSizeProvider 293511a33b45f23d8afc9ff217a817481401932c
| * temporary add library/cpp/streams/factory/open_by_signature to exportiddqd2024-06-0522-0/+1386
| | | | | | | | e7cda406ffefb716562a9a7ba46607dff026f1c1
| * [kernel/server] [library/cpp/http/server] enable timeout for reading from ↵ilnurkh2024-06-051-1/+1
| | | | | | | | | | | | | | socket by default анонс https://at.yandex-team.ru/clubs/arcadia/30286 77f0f6dfa6c3bc8c2a8428ecf91cd76b22bdb60e
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-06-051-1/+1
| | | | | | | | 78574ec3b29ba6ee7f533860ee9b27c3a91365c2
| * Disable static analysis on old clang versionsarkady-e1ppa2024-06-041-0/+4
| | | | | | | | f18a9a891758a7ec308b2a88b2cdf3f0942b2301
| * Optimize hashing for case-insensitive stringsvadim-xd2024-06-037-6/+254
| | | | | | | | 6e07ea929418b1fae4257a2af37aa0ed5799f22a
* | Merge branch 'rightlib' into mergelibs-240603-0842Alexander Smirnov2024-06-0322-30/+756
|\|
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-06-021-1/+1
| | | | | | | | 7604e12fadf99a4ae81fac39d8926d62d66a9c9f
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-06-011-1/+1
| | | | | | | | e1bd39ae9423633f01b5185703a754aa9e26e3a3
| * Fix build due to accidental c++23 usearkady-e1ppa2024-05-311-2/+7
| | | | | | | | feeb90a4704dca0309a6252ea872283ea9302a4b
| * Support brackets in ipv6 endpoint notationcezarnik2024-05-303-7/+39
| | | | | | | | 60a062b712a946277218f01266a01df505972b31
| * YT-21868: Static analysis of format string in loggingarkady-e1ppa2024-05-307-0/+454
| | | | | | | | | | | | | | | | | | | | | | | | | | Added static analysis to format of YT_LOG_XXX macro's. We expect you to write format string as first or the second argument and follow the rules as if you are writing arguments for `NYT::Format`, which match those of printf: https://en.cppreference.com/w/cpp/io/c/fprintf plus few extra flags like 'v'. At the moment analyser checks if flags sequences is 1. Correctly terminated 2. Only contains specifiers valid for a given argument (if we are parsing nth argument of type T, then T must have all specifiers from its list of Conversion or Flag specifiers. (2) Also means that the number of flag sequences must match the number of arguments supplied to format. You can specialize `TFormatArg<T>` which is used to determine allowed Conversion and Flag specifiers to customise rules of static analysis. E.g. you can introduce new flags to the mix which you promise to parse in the related FormatValue function. If you feel like this produces to much overhead in terms of compile time, you are free to use macro YT_DISABLE_FORMAT_STATIC_ANALYSIS to turn the entire thing into a no-op. We have measured compile time to be affected by roughly 3-5% in a log intensive files. ae6def509474e8a42027bb4ed84ac040509b7c85
| * MaxRedirectCount param for http/simpletrofimenkov2024-05-294-2/+169
| | | | | | | | 1b80d64b6a03772edc52f2331a860ff0b5621898
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-291-1/+1
| | | | | | | | a4ae49ebd9051e7b2ac4206a8ca960db77510feb
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-261-1/+1
| | | | | | | | 4e0c868c6cc3837cee417868521e8087900153fb
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-231-1/+1
| | | | | | | | 39cfa31a7e313cc0a2b62e3c4836db4b6bf04dde
| * Don't use per-TLS anchor countersbabenko2024-05-212-11/+6
| | | | | | | | 85eb5ffdc79771c842f049e9392902ac6868cece
| * YT: Add FormatValue for std::source_locationdgolear2024-05-212-0/+44
| | | | | | | | | | YTORM-1057 0aa4ceb80d984a15c92a69f242ecf517b3c7a07c
| * Intermediate changesrobot-piglet2024-05-201-0/+2
| |
| * Switch to std::format to fix -Wformatthegeorg2024-05-202-8/+36
| | | | | | | | e2d3a54377ea6268a39c35989c259720c10edefa
| * Remove unused vector.h in library/cpp/http/io/headers.hvadim-xd2024-05-171-1/+0
| | | | | | | | 3a95ba7ea18b67eb6bd8d04631814456f4881138
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-171-1/+1
| | | | | | | | 00e7d577abb2a5bc75795293bf112baa41fcad78
* | Merge branch 'rightlib' into mergelibs-240514-0848Alexander Smirnov2024-05-1414-3/+1145
|\|
| * Support meta flags with TThreadedLogBackendzykanton2024-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | При использовании TThreadedLogBackend обнаружили, что в нем теряются метафлаги. Приняли решение поддержать метафлаги в этом типе логов, изменение выглядит безопасным. Использовали лог здесь https://a.yandex-team.ru/arcadia/quality/ab_testing/exp_daemon/usersplitserver.cpp?rev=rXXXXXX#L1807 Коммиты с добавлением метафлагов в другие типы логов: https://a.yandex-team.ru/review/2572611/files/3#file-library/cpp/logger/log.cpp https://a.yandex-team.ru/review/3737503/details f3c5f96405ff1528ef73788d17d09fb4169cd9a2
| * Introduce YT_DEFINE_GLOBAL to help avoiding initialization order fiasco; ↵babenko2024-05-143-1/+23
| | | | | | | | | | | | apply to global loggers in yt/yt/core 787f98549edf6e8d46ac63cdb8db0609ccde42da
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-141-1/+1
| | | | | | | | 37bad2103b3a988020f96323c57461ed20b4d900
| * Publish l1_distance & l2_distanceazevaykin2024-05-137-0/+1046
| | | | | | | | | | | | | | Publish l1_distance & l2_distance to https://github.com/ydb-platform/ydb It has already been published to github: https://github.com/catboost/catboost/tree/master/library/cpp/ a6fd3da173e50ff5a518af0fd5b354f56ca72fdf
| * YT: Add NYT::FormatVectorionagamed2024-05-132-0/+74
| | | | | | | | 5da23499c430efcdae980093fd84c8391537660c
* | Merge branch 'rightlib' into mergelibs-240510-1206Alexander Smirnov2024-05-108-2/+257
|\|
| * YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-081-0/+16
| | | | | | | | | | | | TYsonStruct implementation (now with a fixed bug) 94a777c1510546c0a8a7ef3e3b327add7dfc3813
| * Revert YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-081-16/+0
| | | | | | | | | | | | | | | | | | TYsonStruct implementation Revert "YT-21310: Introduce CYsonStructSource to remove code duplication in TYsonStruct implementation" This reverts commit b5dbf4de1df8156e23176662e15b167361fddb19, reversing changes made to 5ab2a4add3801f5d310e76bf9ba496342d2b765a. 1f84c055d6e4df384230688c946a45dd6351a386
| * Added input tag to monlibevgeniy-kozev2024-05-082-0/+3
| | | | | | | | 4ed1896722ba8cc8e3371fab7d75aa2df2c67d6f
| * Intermediate changesrobot-piglet2024-05-084-0/+236
| |
| * Bunch of issues from babenko-issues tagarkady-e1ppa2024-05-071-2/+2
| | | | | | | | 4a6fd6fb52fcb4d43f76651d645dc2e1affe3dd0
| * YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-071-0/+16
| | | | | | | | | | | | | | TYsonStruct implementation done b5dbf4de1df8156e23176662e15b167361fddb19
* | Merge branch 'rightlib' into mergelibs-240506-1255Alexander Smirnov2024-05-0625-137/+209
|\|
| * Intermediate changesrobot-piglet2024-05-069-9/+9
| |
| * Add TotalSize and Size methodsivanmautin2024-05-063-12/+109
| | | | | | | | | | | | | | | | Раньше метод GetTotalSize() был только в TLRUList, хотя TSizeProvider присутствовал также в TLRUList Добавил GetTotalSize() во все листы (в том числе TLWList), а также метод GetSize(), который возвращает текущее количество Также добавил эти методы в сами TCache и TThreadSafeCache c103617d7259841e1c273cadd8dbf0bb019e52dc
| * Fix ASAN issues in GetTlsScratchBufferbabenko2024-05-051-7/+10
| | | | | | | | c2cf2ec6852cbccda74fe6f6de74283db553a809
| * New version of the tld SKIP_CHECK SKIP_REVIEWrobot-ratatosk2024-05-021-1/+1
| | | | | | | | efd2cb209904cc5d2d0e94bab8b5792f198916fd
| * YT-21566: Access thread local variables via noinline functionslukyan2024-04-2612-111/+83
| | | | | | | | 970c33b44a7bd166b2716d86d3d2053dcaf05d7d
* | Added test ShouldNotFailOnMetricWithoutSensorLabel for prometheus encoder ↵Dmitry Razumov2024-05-061-0/+18
| | | | | | | | | | (#4289) Co-authored-by: Dmitry Razumov <dvrazumov@yandex-team.ru>
* | Don't erase first numerical character in sensor name in prometheus format ↵Dmitry Razumov2024-05-032-4/+85
| | | | | | | | | | (#4226) Co-authored-by: Dmitry Razumov <dvrazumov@yandex-team.ru>
* | Merge branch 'rightlib' into mergelibs-240425-1630Alexander Smirnov2024-04-252-3/+3
|\|
| * Intermediate changesrobot-piglet2024-04-241-2/+2
| |