- 17 Sep, 2012 9 commits
-
-
Tudor Bosman authored
Test Plan: stream_test, exception_tracer_test Reviewed By: soren@fb.com FB internal diff: D569476
-
Philip Pronin authored
Summary: Export histograms in a tab-separated format. Test Plan: Used it. Reviewed By: lucian@fb.com
-
Tudor Bosman authored
Summary: Moved to separate library instead of :io Got rid of the mode argument when creating files -- umask is your friend Separated getSize interface from create Added FsUtil.h for some fs::path operations Switched some interfaces to fs::path instead of string / StringPiece Canonicalize paths so we don't care whether paths are absolute or relative Test Plan: fs_util_test, by hand Reviewed By: philipp@fb.com FB internal diff: D564465
-
Tudor Bosman authored
Test Plan: by hand Reviewed By: lucian@fb.com FB internal diff: D555164
-
Lucian Grijincu authored
Summary: On --platform=gcc-4.6.2-glibc-2.13-fb the build would fail because fbcode/third-party/gcc-4.6.2-glibc-2.13-fb/libgcc/libgcc-4.6.2/b4e37bb/include/c++/4.6.2/bits/basic_fbstring_malloc.h defines it's own version of ALLOCM_SUCCESS & co., but not ALLOCM_LG_ALIGN :( The '#ifdef ALLOCM_SUCCESS' check in 'folly/Malloc.h' would pass even though we didn't include jemalloc. Test Plan: build it Reviewed By: philipp@fb.com FB internal diff: D562273
-
Tudor Bosman authored
Summary: I'll pretend you reviewed this. Test Plan: build Reviewed By: simpkins@fb.com FB internal diff: D562255
-
Tudor Bosman authored
Summary: This change is mostly mechanical (moving files, changing include paths, etc). I made some changes to TARGETS to make it easier for the library to be linked in (instead of LD_PRELOADed) Test Plan: by hand Reviewed By: simpkins@fb.com FB internal diff: D562196
-
Lucian Grijincu authored
Test Plan: . Reviewed By: soren@fb.com
-
Tudor Bosman authored
Summary: Intended to complement and replace strings::byLine. Test Plan: stream_test Reviewed By: delong.j@fb.com FB internal diff: D463341
-
- 26 Aug, 2012 23 commits
-
-
Tudor Bosman authored
Test Plan: yes Reviewed By: andrewjcg@fb.com FB internal diff: D558628
-
Adam Simpkins authored
Summary: When the input type is a long double, perform division using long double. In all other cases, divide using double precision. Also fix the EXPECT_EQ() usage in the test case. Test Plan: fbconfig -r common/stats folly && fbmake runtests Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D555433
-
Adam Simpkins authored
Summary: D527040 had a bug in the code to compute the average: it incorrectly performed unsigned division when ValueType was a signed integer type. As a result, the average was reported incorrectly for stats with negative values. This makes the average code more intelligent when handling type conversions: if the caller wants a floating point value, or if the input type is floating point, floating point division is always returned. Otherwise, if the input is a signed type, signed integer division is performed. Otherwise, unsigned integer division is performed. Test Plan: beholdunittests Reviewed By: lars@fb.com FB internal diff: D553583
-
Adam Simpkins authored
Summary: I wrote this an an example for the BENCHMARK_NAMED_PARAM() comments in D527040, and figured I might as well check it in as a real benchmark. Test Plan: Here's the output: ====================================================================== folly/test/HistogramBenchmark.cpp relative time/iter iters/s ====================================================================== addValue(0_to_100) 15.43ns 64.81M addValue(0_to_1000) 15.45ns 64.70M addValue(5k_to_20k) 15.46ns 64.67M ====================================================================== Reviewed By: rajat@fb.com FB internal diff: D552875
-
Shuai Ding authored
Summary: change shared_ptr<>* to raw pointer in forwardIndex in RTIndex. This saves 16 bytes per forward list (decrease from 88 to 72) and translates to about 4-5% memory saving for RTIndex in ff tier. Test Plan: unit test Reviewed By: xliux@fb.com FB internal diff: D551191
-
Adam Simpkins authored
Summary: Add the BucketedTimeSeries class to folly. This tracks time series counter data, using a circular buffer of buckets to expire old data points as time progresses. It supports querying the overall sum, count, average, and rate for the duration of the time series, as well as estimating these values for portions of the overall duration. Test Plan: Unit tests included. Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D527040
-
Philip Pronin authored
Summary: Before: _bin/folly/test/string_test --benchmark --bm_regex=join --bm_min_usec=1000000 ============================================================================ folly/test/StringTest.cpp relative time/iter iters/s ============================================================================ joinCharStr 3.59us 278.29K joinStrStr 4.44us 225.09K joinInt 10.55us 94.76K ============================================================================ And after: _bin/folly/test/string_test --benchmark --bm_regex=join --bm_min_usec=1000000 ============================================================================ folly/test/StringTest.cpp relative time/iter iters/s ============================================================================ joinCharStr 3.61us 277.01K joinStrStr 3.77us 264.97K joinInt 9.92us 100.81K ============================================================================ Test Plan: unittests, benchmark Reviewed By: tudorb@fb.com FB internal diff: D552364
-
Tudor Bosman authored
Summary: http://burtleburtle.net/bob/hash/spooky.html The code is in the public domain, so republishing it as such is fine. The code needed modifications (the test was designed to run on Windows only; removed unhygienic typedefs; moved to folly::hash namespace) Also updated Makefile.am files. Test Plan: test added Reviewed By: soren@fb.com FB internal diff: D549572
-
Michael Curtiss authored
Summary: a la Hacker's Delight. Also, fix nonsensical nextPowTwo benchmark. Test Plan: Added test and benchmark. Reviewed By: tudorb@fb.com FB internal diff: D551510
-
Philip Pronin authored
Summary: To allow codemod changes. Test Plan: ran test Reviewed By: tudorb@fb.com FB internal diff: D549516
-
Lee Hwa authored
Task #906853: Implement ThreadLocalServiceData and reduce lock contentions during channel counter update Summary: Cache the counter updates on thread local data structures and aggregate/publish the data from a separate thread periodically. The ThreadLocalServiceData is implemented on top of the TLStats data structures. I am plannig to deploy a private build to production tomorrow to test this change in production, but figured it might be better to send the diff out first and get code review feedbacks at the same time. Test Plan: Run and pass unit tests. Run end-to-end testings on sandbox. (TBD) Deploy a private build to a production server and make sure the thrift call latency is reduced. Reviewed By: xin@fb.com FB internal diff: D540239
-
Sergey Doroshenko authored
Summary: Right now, it relies on process id rather than on thread id. Thus, it can return the same seed when called from multiple threads over really short period of time, and these unlucky threads will end up with identical "random" sequences. Test Plan: newly added test fails against trunk, passes against changes in the diff Reviewed By: tudorb@fb.com FB internal diff: D548129
-
Philip Pronin authored
Summary: The same interface as ##facebook::strings::join##, but few times faster. Test Plan: folly/test/StringTest.cpp Reviewed By: tudorb@fb.com FB internal diff: D548863
-
Nicholas Ormrod authored
Summary: convert a dynamic to a well-typed object Test Plan: run test file Reviewed By: delong.j@fb.com FB internal diff: D517021
-
Nitay Joffe authored
Summary: script to wrap gateway to run it with exception tracer. Test Plan: deploy Reviewed By: rajat@fb.com FB internal diff: D548147
-
Adam Simpkins authored
Summary: Print the times using "ms" for milliseconds, "us" for microseconds, etc. Test Plan: $ ./_bin/folly/test/benchmark_test ====================================================================== folly/test/BenchmarkTest.cpp relative time/iter iters/s ====================================================================== bmFun 3.36ns 298.01M bmRepeatedFun 1.76ns 569.38M ---------------------------------------------------------------------- gun 1.70ns 589.82M ---------------------------------------------------------------------- baselinevector 3.08us 324.87K bmVector 13.64% 22.56us 44.32K ---------------------------------------------------------------------- superslow 1.00s 999.82m ====================================================================== Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D546209
-
Andrei Alexandrescu authored
Summary: Only tested in release mode, sigh. Fixed a failing asserd. Test Plan: tested in dbg mode Reviewed By: tudorb@fb.com FB internal diff: D546318
-
Andrei Alexandrescu authored
Summary: https://phabricator.fb.com/D544159 reveals a large performance gap between fbstring and std::string for repeated appends of short strings, which I consider a relatively urgent matter (as much of our code uses such patterns). This diff attempts to fix the issue in a principled manner by first appending the first character with exponential reallocation, after which the rest of the characters are appended normally. With the proposed fix the benchmarks are much faster than the previous fbstring and also than std::string (numbers to follow in comments). Test Plan: unittested and benchmarked Reviewed By: soren@fb.com FB internal diff: D545416
-
Tudor Bosman authored
Summary: ... and is shorter and more readable Test Plan: folly/test Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D545774
-
Nicholas Ormrod authored
Summary: fbvector was not accepting move_iterators for InputIterator-templated construct, assign, and insert. The root cause was the check '(b_ <= &*first && &*first < e_)', used to check if the assignment was from internal data. This addressof check does not compile with rvalue-references, and causes the first iterator to be dereferenced more than once; both against the contract of std::vector. The standard allows for undefined behaviour in the self-iterator case, so there are no contractual barriers to removing this check. Test Plan: run fbvector test and benchmark. An fbgs for 'assign' turns up few matches; the seem to be normal use-case. Test fbvector assign with self-iterators in order (i.e. fbv.assign(fbv.begin(), fbv.end())); this seems to work fine. Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D535012
-
Tom Jackson authored
Summary: ^ Test Plan: Unit tests Reviewed By: delong.j@fb.com FB internal diff: D543586
-
Jeremy Lilley authored
Summary: Appending many small strings to fbstring appears much slower (~3x) vs. std::string. Adding benchmark case to illustrate. [If this isn't wanted, I can revert] Test Plan: This is a benchmark. Reviewed By: soren@fb.com FB internal diff: D544159
-
Andrew Gallagher authored
Test Plan: none Reviewed By: delong.j@fb.com FB internal diff: D543196
-
- 08 Aug, 2012 8 commits
-
-
Tudor Bosman authored
Test Plan: built Reviewed By: delong.j@fb.com FB internal diff: D543320
-
Tudor Bosman authored
Summary: because, shockingly, glibc doesn't divert to the gcc builtins which are inlined and fast Test Plan: folly/test Reviewed By: sding@fb.com FB internal diff: D543363
-
Tudor Bosman authored
Summary: by removing the unnecessary constraint that the input and output be in the same register (copypasta from https://phabricator.fb.com/D542718) Test Plan: folly/test Reviewed By: soren@fb.com FB internal diff: D543310
-
Tudor Bosman authored
Summary: If compiled for a popcnt-supporting target (-march=corei7, for example), use __builtin_popcount, as it's presumably inlined. Otherwise, detect on startup (in the same way as glibc dispatches to one of the many flavors of memcpy): GCC allows us to add a resolver function which the dynamic loader will call on startup to resolve a function to one of various alternatives; we check (using the cpuid instruction) whether popcnt is supported, and use it if available. Test Plan: tests added Reviewed By: soren@fb.com FB internal diff: D542977
-
Andrew Gallagher authored
Summary: It appears that std::unordered_map is no longer relocatable in gcc-4.7. Use std::vector instead, until fbvector supports non- relocatable types. Test Plan: Built and ran facebar tests under gcc-4.7. Also ran folly unittests. Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D543099
-
Xiaoyang Gao authored
Summary: Add operator== and operator!= to folly::StlAllocator, which are required by some other libraries. Test Plan: Tested by running with recursive_wrapper in boost::variant, and unit tests in folly/test. Reviewed By: delong.j@fb.com FB internal diff: D541237
-
James Sharpe authored
Test Plan: Compiled. Reviewed By: andrewjcg@fb.com FB internal diff: D541226
-
Daniel Wu authored
Summary: github pull #11 Test Plan: None. Reviewed By: andrewjcg@fb.com FB internal diff: D541230
-