- 03 Jun, 2013 1 commit
-
-
Tom Jackson authored
Summary: For easily calling a getter on every item in a sequence. Test Plan: Unit tests, benchmarks Reviewed By: mmcurtiss@fb.com FB internal diff: D651206
-
- 23 May, 2013 5 commits
-
-
Jordan DeLong authored
Summary: Per discussion after commit on the previous diff. Test Plan: Compiled. Reviewed By: tjackson@fb.com FB internal diff: D821985
-
Jordan DeLong authored
Summary: A thin wrapper around Optional for terse creation of lazily-initialized values. Test Plan: New tests, and a use case in hphp. Reviewed By: tjackson@fb.com FB internal diff: D817906
-
Maxime Boucher authored
Summary: See title. Test Plan: From fbocde, type: fbconfig folly/test; fbmake opt -j 32; fbmake runtests_opt -j 32 Reviewed By: delong.j@fb.com FB internal diff: D818077
-
Mike Curtiss authored
Summary: Comment Test Plan: Builds Reviewed By: tjackson@fb.com FB internal diff: D814986
-
Paul Tarjan authored
Test Plan: none Reviewed By: tjackson@fb.com FB internal diff: D818326
-
- 20 May, 2013 30 commits
-
-
Mike Curtiss authored
Summary: Take a random sample of size N from a range. Clients can also pass in a custom random number generator. Test Plan: Added test and benchmark. Reviewed By: tjackson@fb.com FB internal diff: D811260
-
Adam Simpkins authored
Summary: Add a new SubprocessSpawnError, and change the Subprocess constructor to throw this if the child process encounters an error before calling execve(). Error information is passed back to the parent process over a pipe. Previosly in this case the Subprocess constructor would fail, and clients would simply get a return code of 126 or 127 when waiting on the process. There was no way to distinguish this from a successful execve() followed by the child process exiting with status 127. Test Plan: Added tests to check the exception behavior, and also to check for file descriptor leaks in the parent process. Reviewed By: tudorb@fb.com FB internal diff: D776273
-
Chip Turner authored
Summary: Aids in debugging dynamic types, etc. Test Plan: unit tests Reviewed By: delong.j@fb.com FB internal diff: D812385
-
Mark Williams authored
Summary: AtomicHashMap/AtomicHashArray didn't support a custom equality function, and didnt support pointer keys. We only ever do compare-and-swap against the 3 "magic" keys, so as long as we're careful we can continue to do that, while using the equality function elsewhere. Also add a user-configurable growth rate, independent of maxLoadFactor. Test Plan: automated tests Reviewed By: delong.j@fb.com FB internal diff: D806936
-
Tudor Bosman authored
Test Plan: compiled file_util_test Reviewed By: soren@fb.com FB internal diff: D809250
-
Maxime Boucher authored
Summary: Calling CHECK() in folly will force the program to abort in case of a failure. On the other hand, for range checking, the standard library throws std::out_of_range for many functions. Thus it could be a good idea to throw the same exception in folly so that errors can be handled using try {} catch (...) {} blocks. Test Plan: from fbcode, type: fbconfig -r folly; fbmake opt -j32; fbmake runtests_opt -j 32 What other tests should I run? Reviewed By: tudorb@fb.com FB internal diff: D808204
-
Maxime Boucher authored
Summary: Calling CHECK() in folly will force the program to abort in case of a failure. On the other hand, for range checking, the standard library throws std::out_of_range for many functions. Thus it could be a good idea to throw the same exception in folly so that errors can be handled using try {} catch (...) {} blocks. Test Plan: from fbcode, type: fbconfig -r folly; fbmake opt -j32; fbmake runtests_opt -j 32 What other tests should I run? Reviewed By: tudorb@fb.com FB internal diff: D808204
-
Tudor Bosman authored
Summary: Also move manually-generated stuff away from folly-config.h and into Portability.h. This should be only for things that differs between the various (compiler, library) pairs used internally at FB; everything else should be autoconf-ed and therefore go into folly-config.h. Test Plan: built and ran file_util_test on various platforms Reviewed By: delong.j@fb.com FB internal diff: D807067 Blame Revision: D806781
-
Tudor Bosman authored
Summary: Strings can be moved around while the vector grows. Test Plan: file_util_test Reviewed By: lucian@fb.com FB internal diff: D806966 Blame Revision: D806781
-
Tudor Bosman authored
Summary: zero-copy Test Plan: record_io_test Reviewed By: lucian@fb.com FB internal diff: D806813
-
Tudor Bosman authored
Summary: Testing incomplete reads / writes is hard, so I'm only testing the wrappers (template functions that take the underlying operation and retry it in case of incomplete operations). Note the cute hack of using variadic templates to use the same wrapper for both file pointer- and explicit-position flavors of the functions (the offset argument becomes optional). Test Plan: test added Reviewed By: lucian@fb.com FB internal diff: D806781
-
Tudor Bosman authored
Summary: You can now submit to the same AsyncIO object from different threads, but you must still reap from only one thread at a time. Test Plan: async_io_test, added MT test Reviewed By: philipp@fb.com FB internal diff: D804914
-
Owen Yamauchi authored
Summary: gcc and clang both give you these three macros pre-defined. I've found a reference on the interweb to this being broken (http://gcc.gnu.org/ml/gcc/2011-08/msg00152.html) but that was with gcc 4.4. I've tested with 4.6, 4.7 and clang 3.2 and they all do the right thing on little-endian (internal build and OS X). Alas, I don't have a big-endian system handy to test with. Test Plan: fbconfig/fbmake runtests. Reviewed By: simpkins@fb.com FB internal diff: D799416
-
Owen Yamauchi authored
Summary: Unfortunately, this doesn't exist on all platforms. Fortunately, both gcc and clang support builtins that do the same thing as the bswap_* functions we were including byteswap.h for. I changed the test file to hardcode expected results for the swapping functions. Is that OK? It seemed a little silly to be testing the Endian::whatever functions by comparing them against the functions that they're implemented in terms of. Test Plan: fbconfig/fbmake runtests with gcc 4.6 and 4.7. Verified separately that clang supports these builtins. Reviewed By: simpkins@fb.com FB internal diff: D799244
-
Owen Yamauchi authored
Summary: It doesn't exist on some systems (at least Mac OS X). We're only using it for __GNUC_PREREQ, which is easy to provide our own definition for. I moved the definitions of FOLLY_FINAL and FOLLY_OVERRIDE into folly-config.h so we can autoconf them in the open-source build. The hardcoded stuff for the internal build is a little ugly, unfortunately. folly can't be built with gcc versions earlier than 4.6, so that check in ThreadLocal.h is pointless by now. (Plus we use noexcept without a macro wrapper all over the place.) That stuff was also not clang-friendly. clang has supported static_assert since 2.9 and noexcept since... I'm not sure but at least 3.0. Test Plan: fbconfig/fbmake runtests, with gcc 4.6 and 4.7. clang can't build folly right now, but I verified separately that it supports noexcept and static_assert. Reviewed By: simpkins@fb.com FB internal diff: D799143
-
Hannes Roth authored
Summary: I am trying to move more code into a HPHP extension, and it's complaining about this. Test Plan: `fbconfig -r folly && fbmake runtests` Reviewed By: delong.j@fb.com FB internal diff: D799096
-
Owen Yamauchi authored
Summary: Discovered this while trying to build folly on OS X. It would print a warning about Boost being missing that got drowned out in the rest of the configure output, and then the build would fail. This makes the failure more friendly. Test Plan: `autoreconf; ./configure` on a system without boost installed; make sure configure fails and the last thing it prints is the boost error message. Reviewed By: delong.j@fb.com FB internal diff: D797389
-
Peter Griess authored
Summary: - Add some convenience methods for reading std::string objects via folly::Cursor Test Plan: - Unit tests Reviewed By: simpkins@fb.com FB internal diff: D795428
-
Tom Jackson authored
Summary: There are quite a few places where we split strings into a fixed number of fields. This enables this to be done a bit faster by not using any variable-length structures at runtime. Test Plan: Unit tests, Benchmarks Reviewed By: philipp@fb.com FB internal diff: D794523
-
Tudor Bosman authored
Summary: RecordIO provides an interface to write and read streams of variable-length records that is resilient in the face of failure and data corruption. If the stream is corrupted in any way, you will lose records, but the stream will resynchronize. We have one implementation of RecordIO reader/writer that reads from / writes to regular files (using mmap(), even for writes, so we can preserve state even in case of process death -- the buffer cache will flush things to disk eventually) and we expose enough of the guts (in a reasonably clean way) so you can build your own on top of other backends. Test Plan: test added Reviewed By: mmcurtiss@fb.com FB internal diff: D790275
-
Tudor Bosman authored
Summary: Test required a separate process, as fcntl locks are always re-granted to a process that holds the lock. Test Plan: new tests, all tests under folly Reviewed By: lucian@fb.com FB internal diff: D791370
-
Jordan DeLong authored
Summary: This wasn't building with an error from a warning about narrowing conversions---probably we didn't notice because it was previously broken due to folly docs being broken forever. Folly tests should always pass. (I want to add it to the fbcode-tests-must-pass commit hook.) Test Plan: fbmake runtests_opt in this platform, except with stl_tests turned off because it takes years to compile. Reviewed By: andrewjcg@fb.com FB internal diff: D792059
-
Tom Jackson authored
Summary: It was broken because the `dynamic`'s iterator wasn't complete. Test Plan: Unit test Reviewed By: jbrewer@fb.com FB internal diff: D793618
-
Tom Jackson authored
Test Plan: Unit tests Reviewed By: jbrewer@fb.com FB internal diff: D791149
-
Tom Jackson authored
Summary: Comparisons with values can lead to confusion, especially when the value itself is truthy. To avoid this confusion, I'm disabling comparison with contained value. Note that Optionals can still be constructed and assigned these values, but comparsion must be done separately for the container and the contained. Test Plan: Unit tests, contbuild Reviewed By: tudorb@fb.com FB internal diff: D783621
-
Tudor Bosman authored
Test Plan: ran it Reviewed By: lucian@fb.com FB internal diff: D787733
-
Adam Simpkins authored
Summary: The BucketedTimeSeries::rateHelper() function is generic, and not specific to the BucketedTimeSeries class. This diff moves it to folly/detail/Stats.h, so other parts of the stats code can access it as well. Test Plan: Ran the folly unit tests. Reviewed By: delong.j@fb.com FB internal diff: D778115
-
Adam Simpkins authored
Summary: Make rate() and countRate() more accurate when queried for a specific time range. Previously these functions divided the estimated sum/count by the entire time range specified. This underestimated the rate if we don't actually have data for the entire time period. (Since the sum computed only takes into account the time range for which we have data.) For example, if the timeseries duration was 60 seconds, but only 30 seconds of data had been entered so far, rate(now - 60, now) would underestimate the rate by half, since there was only 30 seconds worth of data available. The no-argument version of rate() did work correctly in that case. Test Plan: Added a new unit test for this behavior. Also fixed the existing rate test code, which had the same bug and expected the underestimated rate. Reviewed By: delong.j@fb.com FB internal diff: D778114
-
Philip Pronin authored
Summary: 21.4.2 [string.cons] / 23 says > If *this and str are the same object, the member has no effect. That means we have to support self-move-assignment. Test Plan: added test which triggered assertion, ran it Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D785057
-
Tudor Bosman authored
Test Plan: test added Reviewed By: delong.j@fb.com FB internal diff: D783100
-
- 21 Apr, 2013 4 commits
-
-
Tudor Bosman authored
Summary: Seems like a good idea. Test Plan: compiled all of folly Reviewed By: delong.j@fb.com FB internal diff: D783104
-
Tudor Bosman authored
Test Plan: fbconfig $(find folly -name test) && fbmake runtests_opt Reviewed By: tjackson@fb.com FB internal diff: D777186
-
Tudor Bosman authored
Summary: Now that the third_party link was updated in https://phabricator.fb.com/D778617, we're good. Test Plan: fbconfig -r thrift && fbmake runtests_opt Reviewed By: chip@fb.com FB internal diff: D778707
-
Tudor Bosman authored
Summary: Unbreak build. third-party link not yet updated after https://phabricator.fb.com/D776457 Test Plan: no Reviewed By: chip@fb.com FB internal diff: D778669
-