- 01 May, 2018 6 commits
-
-
Steve O'Brien authored
Summary: In a test build `<iterator/iterator_facade>` showed up as the most heavyweight include. Remove this include, dependency on the boost lib, and implement whatever's needed for the bidirectional iterator interface. Reviewed By: yfeldblum Differential Revision: D7781659 fbshipit-source-id: 380e0ae85b18c245845f479b2d268fdd3e16d54a
-
Adam Simpkins authored
Summary: Promote the folly logging code out of the experimental subdirectory. We have been using this for several months in a few projects and are pretty happy with it so far. After moving it out of the experimental/ subdirectory I plan to update folly::Init() to automatically support configuring it via a `--logging` command line flag (similar to the initialization it already does today for glog). Reviewed By: yfeldblum, chadaustin Differential Revision: D7755455 fbshipit-source-id: 052db34c97f7516728f7cbb1a5ad959def2f6efb
-
Marc Celani authored
Summary: As title. We were special casing q == 1 or q == 0 improperly before. This led to some strange results where p100 < p99.9. Track min and max (useful anyway), and use those for boundaries. Reviewed By: anakryiko Differential Revision: D7800645 fbshipit-source-id: 5fa3e1d0d286d4b31442196ba74b072030706786
-
Orvid King authored
Summary: This should fix running tests in a vcpkg environment. Reviewed By: yfeldblum Differential Revision: D7822368 fbshipit-source-id: a549febeb0bbea7208386cbed8a6ecb316b98661
-
Orvid King authored
Summary: Because Windows doesn't have `uint` as it's non-standard. Reviewed By: djwatson Differential Revision: D7821774 fbshipit-source-id: 4f7ff4468fc56052e28995f386e194fe70c6c513
-
Orvid King authored
Summary: Because it makes Visual Studio's intellisense happier, and it's always better to match exactly, rather than matching implicitly. Reviewed By: yfeldblum Differential Revision: D7821865 fbshipit-source-id: 9e2380884b2d8d12944e3a3fc921e532208b1791
-
- 30 Apr, 2018 5 commits
-
-
Matthieu Martin authored
Summary: And move it to folly::python namespace. We are going to make the python bridge work with fibers. This will require to make changes to this executor that are quite specific for the python use case. It doesn't hurt to remove YetAnotherExecutor choice from the main executor directory. Reviewed By: yfeldblum Differential Revision: D7811125 fbshipit-source-id: eec21ccbbbad58aaa795df661ba58f67fa177645
-
Xiao Shi authored
Summary: As per discussions on D7784214, to be consistent with the functions used by the integral_hasher, mark these `noexcept`. Not much benefit for this diff other than consistency. Reviewed By: yfeldblum Differential Revision: D7797826 fbshipit-source-id: 382c82556efd261841f3f6fb2ae892d26f3ceb0b
-
Stepan Palamarchuk authored
Summary: Currently we'll are getting incorrect Idle&Busy time counters for loops when there were no LoopCallbacks. This is because we don't properly refresh the `startWork_` and use the one from the last loop that had LoopCallbacks. This diff fixes that by properly refreshing `startWork_` even if there're no LoopCallbacks. Reviewed By: yfeldblum Differential Revision: D7811127 fbshipit-source-id: 94ded08963b1bddc7b7859484f076d4c8a1e897f
-
Subodh Iyengar authored
Summary: Fix shadown warning for xplat builds Reviewed By: yfeldblum Differential Revision: D7811636 fbshipit-source-id: 609b5acaca3cfdd11059ed1ebbaa969e281487a2
-
Subodh Iyengar authored
Summary: Calling connect on the UDP socket can avoid route lookups on the write path. This would be an optimization that would be useful for clients. There are several caveats of using connect() which we discovered during testing. These are documented and unit tests have been written for each of them. Reviewed By: yfeldblum Differential Revision: D7802389 fbshipit-source-id: 09b71373a3a95c5dab73ee9345db0dbbf66d4ec5
-
- 28 Apr, 2018 4 commits
-
-
Marc Celani authored
Summary: Some links are complaining of multiple definitions. Move to the cpp file to resolve. Reviewed By: yfeldblum Differential Revision: D7806874 fbshipit-source-id: f25342d647505b676ba3659400c63d6a59344024
-
Marc Celani authored
Summary: This header is no longer needed since D7687476. Reviewed By: yfeldblum Differential Revision: D7804756 fbshipit-source-id: 6596f5296965b593ab5b0decf4c67203e19b03c8
-
Marc Celani authored
Summary: As title Reviewed By: tageorgiou Differential Revision: D7804647 fbshipit-source-id: 9a58de258cd49a4d15ded05163975304c0e7e83b
-
Marc Celani authored
Summary: This worked in clang but not in gcc. Quick fix Differential Revision: D7800576 fbshipit-source-id: fcd04c0779f8a176043f3dede61289830a1ef607
-
- 27 Apr, 2018 10 commits
-
-
Marc Celani authored
Summary: Introduces two QuantileEstimators. Both estimators use the TDigest for estimating quantiles, and giving accurate sum, count, and mean. One estimator uses a single digest, and the other uses a SlidingWindow of 60 digests. All writes to the data structure are buffered for 1 second. Reviewed By: anakryiko Differential Revision: D7645824 fbshipit-source-id: 4f1f2c25388c3280f148591502449f857c6467d3
-
Yedidya Feldblum authored
Summary: [Folly] Use `invoke_result` v.s. `std::result_of`, which is deprecated. Reviewed By: aary, ericniebler Differential Revision: D7771480 fbshipit-source-id: 1d89d489be98bfbe2014f2d6b5fc037f02147876
-
Yedidya Feldblum authored
Summary: [Folly] Cut unused alias `isFutureResult`. Reviewed By: Orvid Differential Revision: D7787146 fbshipit-source-id: 44ed51e9e04c71530f67fc6dceb76b247dcadb55
-
Léonard Gérard authored
Summary: The test was missing a `main` meaning that it would fail even if libc++ was in use, making all the rest fail on macos for example. Closes https://github.com/facebook/folly/pull/831 Reviewed By: Orvid Differential Revision: D7787115 Pulled By: yfeldblum fbshipit-source-id: 4a10323298be3f26f783fa1257cbde2483fb75b9
-
Xiao Shi authored
Summary: The libstdc++ implementation of `std::unordered_map|set` determines whether to cache a per-node hash code based on (1) whether the supplied hasher is fast (true by default) and (2) whether the hashing operation will throw. Mark the `operator()` of hashers of numeric types (integral, float, enum) `noexcept`, such that stl unordered containers won't cache a hash code. This is essentially free memomy savings, as comparing the cached hash code is as expensive as comparing the numerical types directly. Reviewed By: luciang Differential Revision: D7784214 fbshipit-source-id: 020e1c38265f33a482b6ba913a11f1a383e840f8
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D7765404 fbshipit-source-id: 3f09d6806d0fb98cb59529adc6ea2d51fa7ccbbb
-
Marc Celani authored
Summary: BufferedStat hooks up the DigestBuilder and a Digest or a SlidingWindow Every windowDuration time, the DigestBuilder builds a new digest that will be merged into the central data structure (either a digest or a sliding window of digests). This diff removes the shared buffer from DigestBuilder, as the concurrency model was getting overly complex with it. Reviewed By: simpkins Differential Revision: D7629082 fbshipit-source-id: 54027363d37c0fdced287550eea5b12caf6b8138
-
Yedidya Feldblum authored
Summary: [Folly] Use `is_invocable_r` in `MapUtil` v.s. reimplementing it. Reviewed By: aary Differential Revision: D7771481 fbshipit-source-id: 41565a06198ed2289206f01a088c3c1b3a01bc8e
-
Yedidya Feldblum authored
Summary: [Folly] Use `is_invocable_r` in `FunctionRef` v.s. reimplementing it. Reviewed By: ot Differential Revision: D7769745 fbshipit-source-id: 3cb7bf9908cc6e93c7d19ace9a91c69ba14cdfae
-
Mingtao Yang authored
Summary: OpenSSL 1.1.0 renamed and deprecated X509_CRL_get_lastUpdate -> X509_CRL_get0_lastUpdate along with X509_CRL_get_nextUpdate -> X509_CRL_get0_nextUpdate Reviewed By: ngoyal, anirudhvr, Orvid Differential Revision: D7782339 fbshipit-source-id: 63f04284bb54da87d4235a02890107db8abaa4b4
-
- 26 Apr, 2018 3 commits
-
-
Igor Sugak authored
Summary: This was exposed by the latest clang with -Wreturn-std-move enabled: ```lang=bash folly/FBString.h:2487:12: error: local variable 'rhs' will be copied despite being returned by name [-Werror,-Wreturn-std-move] return rhs; ^~~ folly/test/FBStringTest.cpp:1294:23: note: in instantiation of function template specialization 'folly::operator+<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >' requested here auto test1 = '\0' + std::move(s1); ^ folly/FBString.h:2487:12: note: call 'std::move' explicitly to avoid copying return rhs; ^~~ std::move(rhs) 2 errors generated. ``` Reviewed By: Orvid Differential Revision: D7776805 fbshipit-source-id: f11ae5a1fc416b8838b8ea74d7f6b488f07cab38
-
Dave Watson authored
Summary: Need to also allow calling this function with a writeLock. Reviewed By: magedm Differential Revision: D7477326 fbshipit-source-id: 403e2667a3f77be4c1d7d06dbd5f36218a659abc
-
Chao Yang authored
Summary: The test is intended to verify the handling of trailing space. Reviewed By: yfeldblum Differential Revision: D7761229 fbshipit-source-id: 0196f57e6c76562562ef1b724f6dff1c7bfd5d81
-
- 25 Apr, 2018 7 commits
-
-
Adam Simpkins authored
Summary: Rename folly/Logging.h to folly/GLog.h. This header primarily exists to just include <glog/logging.h>, and it also defines a single `FB_LOG_EVERY_MS()` macro. I plan to move the folly/experimental/logging/ directory to folly/logging/ soon, and I want to avoid confusing between this `Logging.h` header and the separate `folly/logging/` code. Reviewed By: yfeldblum Differential Revision: D7754543 fbshipit-source-id: c91b8016d303cd0fae9e688e8782b22d095a6554
-
Adam Simpkins authored
Summary: D7642870 accidentally broke linking of folly when libunwind is available. It change the code to use the contents of `${FOLLY_LINK_LIBRARIES}` in folly-deps.cmake, but libunwind was added to `${FOLLY_LINK_LIBRARIES}` after folly-deps.cmake was included, in FollyConfigChecks.cmake. This moves the check for libunwind to folly-deps.cmake to fix this issue. All of the other checks for external libraries are already in folly-deps.cmake. Reviewed By: yfeldblum Differential Revision: D7764762 fbshipit-source-id: 922459a7eefcbd92d3d77c02e9c215bb1a5467cc
-
Andrii Grynenko authored
Summary: This allows using a keep-alive token in places where Executor* was previously used. Reviewed By: yfeldblum Differential Revision: D7751516 fbshipit-source-id: af2cb31191a78306439408dbee78dcd923492e30
-
Philip Pronin authored
Summary: `PRETTY_TIME_HMS` extends `PRETTY_TIME` by adding additional minutes and hours units which are more useful for human-reporting of time intervals. Reviewed By: yfeldblum Differential Revision: D7762524 fbshipit-source-id: 881936916db182c163a3df14196f4f11fb649527
-
Yedidya Feldblum authored
Summary: [Folly] Avoid using gmock private macros - instead, use only the public interface. Reviewed By: knekritz Differential Revision: D7752463 fbshipit-source-id: 625465e7ec93613869e259fe1fe0b08aee7bb7d0
-
Xiao Shi authored
Summary: This diff adds a method to calculate the amount of memory allocated by F14 sets. It mimics the node structure in `std::unordered_map` to calculate the results. For certain keys and hashers, the libstdc++ implementation of `std::unordered_map` caches a hash code in the node. libcpp seems to do this for everything. https://github.com/gcc-mirror/gcc/blob/9ce5a00d2d3b8b107cb1ca0e23bf1e31a095f9b6/libstdc%2B%2B-v3/include/bits/hashtable.h#L45-L49 https://github.com/llvm-mirror/libcxx/blob/58bcf28c63e0cf2ee5828e7811829c98bd244dda/include/__hash_table#L117 Depends on D7715573. Reviewed By: nbronson Differential Revision: D7728281 fbshipit-source-id: 0aa3ab60c746d3ab6bdb7c879f2f987110e0329d
-
Orvid King authored
Summary: Because not everyone is at C++17 yet. Reviewed By: yfeldblum Differential Revision: D7751672 fbshipit-source-id: bcca4d4da67d56be0217a940144977f1cc98e5a1
-
- 24 Apr, 2018 5 commits
-
-
Orvid King authored
Summary: Add the currency tests to the CMake build so they can be built in open-source. Reviewed By: yfeldblum Differential Revision: D7750783 fbshipit-source-id: a6e7f9490e0b88bcfab8b2aa706e1504f2a28c66
-
Kevin Ventullo authored
Summary: This looked like a copypasta error. Since there is no duration passed in, there is no notion of timeout. Reviewed By: shixiao, Orvid Differential Revision: D7747574 fbshipit-source-id: 279992d237dd0924ea0be9deafab94c1aef48838
-
Yedidya Feldblum authored
Summary: [Folly] Fix autotools build afte removing `folly/Optional.cpp`. Reviewed By: akrieger Differential Revision: D7737170 fbshipit-source-id: 1a9286f240bf5a15ee08b707b69377f8d3cfdb48
-
Anirudh Ramachandran authored
Summary: OpenSSL 1.1.0 uses a fiber-based (makecontext/swapcontext) API to do asynchronous operations. When some operation deep inside the stack calls ASYNC_pause_job, SSL_accept returns -1 with error SSL_ERROR_WANT_ASYNC. OpenSSL chose to use fds to wait on, so after SSL_accept returns, we create an AsyncPipeReader to restart SSL_accept when the pipe becomes readable, which is our indication that the async job processing has finished. Also implemented a test to kick off an async job in a different thread that creates a pipe and gives the read end back to the SSL* before calling ASYNC_pause_job Reviewed By: yfeldblum Differential Revision: D5977514 fbshipit-source-id: 3aba2e45b9357dc28cf7cf785654072f8ba8dd65
-
Matthieu Martin authored
Summary: On top of the recent/big EventBaseLoopController cleanup away from most EventBase internal, this is unecessary Reviewed By: andriigrynenko Differential Revision: D7734236 fbshipit-source-id: df38cc30fc52df929f096fb878bc1a4b6894850a
-