| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
d4d08d59dfff0c48a950a3faa36be4ac7e060912
|
| |
| |
| |
| |
| | |
Followup for rXXXXXX - further optimize ascii-only case insensitive strings
1fca7889a074a191eadce12247bdd6dd18b75ab2
|
| |
| |
| |
| |
| |
| | |
library/cpp/streams/factory/open_by_signature to export
6c14e61e6b845e2aa92a25daf61de10267e9e8a0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
2c3ce3e36d35b563fe21b581380310ac84007f57
|
| |
| |
| |
| |
| |
| | |
На данный момент никак нельзя создать 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
|
| |
| |
| |
| | |
e7cda406ffefb716562a9a7ba46607dff026f1c1
|
| |
| |
| |
| |
| |
| |
| | |
socket by default
анонс https://at.yandex-team.ru/clubs/arcadia/30286
77f0f6dfa6c3bc8c2a8428ecf91cd76b22bdb60e
|
| |
| |
| |
| | |
78574ec3b29ba6ee7f533860ee9b27c3a91365c2
|
| |
| |
| |
| | |
f18a9a891758a7ec308b2a88b2cdf3f0942b2301
|
| |
| |
| |
| | |
6e07ea929418b1fae4257a2af37aa0ed5799f22a
|
|\| |
|
| |
| |
| |
| | |
7604e12fadf99a4ae81fac39d8926d62d66a9c9f
|
| |
| |
| |
| | |
e1bd39ae9423633f01b5185703a754aa9e26e3a3
|
| |
| |
| |
| | |
feeb90a4704dca0309a6252ea872283ea9302a4b
|
| |
| |
| |
| | |
60a062b712a946277218f01266a01df505972b31
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
1b80d64b6a03772edc52f2331a860ff0b5621898
|
| |
| |
| |
| | |
a4ae49ebd9051e7b2ac4206a8ca960db77510feb
|
| |
| |
| |
| | |
4e0c868c6cc3837cee417868521e8087900153fb
|
| |
| |
| |
| | |
39cfa31a7e313cc0a2b62e3c4836db4b6bf04dde
|
| |
| |
| |
| | |
85eb5ffdc79771c842f049e9392902ac6868cece
|
| |
| |
| |
| |
| | |
YTORM-1057
0aa4ceb80d984a15c92a69f242ecf517b3c7a07c
|
| | |
|
| |
| |
| |
| | |
e2d3a54377ea6268a39c35989c259720c10edefa
|
| |
| |
| |
| | |
3a95ba7ea18b67eb6bd8d04631814456f4881138
|
| |
| |
| |
| | |
00e7d577abb2a5bc75795293bf112baa41fcad78
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
При использовании 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
|
| |
| |
| |
| |
| |
| | |
apply to global loggers in yt/yt/core
787f98549edf6e8d46ac63cdb8db0609ccde42da
|
| |
| |
| |
| | |
37bad2103b3a988020f96323c57461ed20b4d900
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
5da23499c430efcdae980093fd84c8391537660c
|
|\| |
|
| |
| |
| |
| |
| |
| | |
TYsonStruct implementation (now with a fixed bug)
94a777c1510546c0a8a7ef3e3b327add7dfc3813
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TYsonStruct implementation
Revert "YT-21310: Introduce CYsonStructSource to remove code duplication in TYsonStruct implementation"
This reverts commit b5dbf4de1df8156e23176662e15b167361fddb19, reversing
changes made to 5ab2a4add3801f5d310e76bf9ba496342d2b765a.
1f84c055d6e4df384230688c946a45dd6351a386
|
| |
| |
| |
| | |
4ed1896722ba8cc8e3371fab7d75aa2df2c67d6f
|
| | |
|
| |
| |
| |
| | |
4a6fd6fb52fcb4d43f76651d645dc2e1affe3dd0
|
| |
| |
| |
| |
| |
| |
| | |
TYsonStruct implementation
done
b5dbf4de1df8156e23176662e15b167361fddb19
|
|\| |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Раньше метод GetTotalSize() был только в TLRUList, хотя TSizeProvider присутствовал также в TLRUList
Добавил GetTotalSize() во все листы (в том числе TLWList), а также метод GetSize(), который возвращает текущее количество
Также добавил эти методы в сами TCache и TThreadSafeCache
c103617d7259841e1c273cadd8dbf0bb019e52dc
|
| |
| |
| |
| | |
c2cf2ec6852cbccda74fe6f6de74283db553a809
|
| |
| |
| |
| | |
efd2cb209904cc5d2d0e94bab8b5792f198916fd
|
| |
| |
| |
| | |
970c33b44a7bd166b2716d86d3d2053dcaf05d7d
|
| |
| |
| |
| |
| | |
(#4289)
Co-authored-by: Dmitry Razumov <dvrazumov@yandex-team.ru>
|
| |
| |
| |
| |
| | |
(#4226)
Co-authored-by: Dmitry Razumov <dvrazumov@yandex-team.ru>
|
|\| |
|
| | |
|