summaryrefslogtreecommitdiff
path: root/absl/strings/internal/cordz_info_statistics_test.cc
Commit message (Collapse)AuthorAge
* Allow Cord to store chunked checksumsGravatar Derek Mauro2022-12-11
| | | | | PiperOrigin-RevId: 494587777 Change-Id: I41504edca6fcf750d52602fa84a33bc7fe5fbb48
* Fix "unsafe narrowing" warnings in absl, 6/n.Gravatar Abseil Team2022-08-29
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in strings/internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 470810568 Change-Id: Ibd316a7e62cc43cb198ba22daed565c9573ce235
* Export of internal Abseil changesGravatar Abseil Team2022-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ceee18732f9499d3a53d46d5974f12ea0774b900 by Abseil Team <absl-team@google.com>: Remove division from the profile guided optimization PiperOrigin-RevId: 428444108 -- fc27059f1b0c0b4cb8ddd9a7a88220af52c0c755 by Evan Brown <ezb@google.com>: Rename btree_node::leaf to is_leaf and also add is_internal for readability improvements. PiperOrigin-RevId: 428076422 -- 6a90d18477cc3a6de84282b6e38d6f294aa72748 by Evan Brown <ezb@google.com>: In sanitizer mode, add generation integers to b-tree nodes and iterators and validate that iterators have not been invalidated already when they're used. Even though generation integers are stored in all nodes, we only use the one stored in the root node for validation. The reason we keep one in all the nodes is that nodes can become a root node after they are allocated. Also change the order of args in init_leaf to not violate the style guide. PiperOrigin-RevId: 428054226 -- ede4a0f676f43e7003fd2599c263d55222e760ba by Martijn Vels <mvels@google.com>: Physically remove CordRepConcat This CL removes all uses of CordRepConcat. This change is executed by removing all the dead 'btree_enabled()' and 'IsConcat' branches, and all subsequent dead code. This change explicitly does not optimize any of the remaining code other than the most trivial ones such as removing 'stack' loop vars and loops. PiperOrigin-RevId: 428002308 -- 7cc83d96118149cf1aa1258a066b8fd4517df5f6 by Evan Brown <ezb@google.com>: Change btree_iterator from a struct to a class. Motivation: btree_iterator has private members and invariants so it should be a class. Also merge two private sections. PiperOrigin-RevId: 427768836 -- 524d478b0af422e1a867a8823d9fbad149030360 by Martijn Vels <mvels@google.com>: Physically block the creation of new CordRepConcat nodes. This change removes CordRepConcat creation, issuing a FATAL errors on the (practically impossible) call path on broken invariants. This change is deliberately limited in impact, subsequent changes will be more voluminous ripping out the (now dead) CordRepConcat code. PiperOrigin-RevId: 427741022 -- e21eb354c1bb358ea8b64d0e3fbb378e87b8b8c4 by Derek Mauro <dmauro@google.com>: Update the implementation of ABSL_DEPRECATED to work with GCC, and recommend using the standard attribute [[deprecated]] for C++14 and newer GCC users that are experiencing new warnings can silence them with -Wno-deprecated-declatations. GCC users that want to see the warnings but not error on them can use -Wno-error=deprecated-declarations. PiperOrigin-RevId: 427228952 -- 0ab4ee5660f3a072054dc4ab5056925c26977c7a by Laramie Leavitt <lar@google.com>: Change comment to avoid overflow. PiperOrigin-RevId: 427090218 GitOrigin-RevId: ceee18732f9499d3a53d46d5974f12ea0774b900 Change-Id: Ida00477b6a3d02a8b7bb467be7621b618385d1e9
* Export of internal Abseil changesGravatar Abseil Team2022-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 262f6992ee0553782531ad58dd7d8bcd6d0b7bb7 by Martijn Vels <mvels@google.com>: Remove CordRepConcat uses in tests and CONCAT constants. This change removes the creation and uses of CordRepConcat in unit tests, and replaces some remaining CONCAT constants with IsConcat() to make subsequent teardown of CordrepConcat uses easier. PiperOrigin-RevId: 426932694 -- fd590f7e849ba8c5395c589ed3f762cd00affdc8 by Abseil Team <absl-team@google.com>: Replace NULL and 0 with nullptr. PiperOrigin-RevId: 426912932 -- 183e5babc478748023f732a1608745a2a544c996 by Abseil Team <absl-team@google.com>: Replace "span of time" with "amount of time" in the first comment line, to make it clearer that we're not talking about a duration that starts at a specific time. PiperOrigin-RevId: 426691794 -- e28ca760f21505f1be55c7af336eb61d2f1b7fea by Martijn Vels <mvels@google.com>: Add extra assertions on CordRepSubstring child nodes PiperOrigin-RevId: 426369104 GitOrigin-RevId: 262f6992ee0553782531ad58dd7d8bcd6d0b7bb7 Change-Id: I7ffdaa2dc999a2117944c9abdb1565b6b6f48b59
* Export of internal Abseil changesGravatar Abseil Team2021-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 83e4cdf03a4d702b30e69204060de09e462e23c6 by Greg Falcon <gfalcon@google.com>: Revert the crc addition to RefcountAndFlags, and restore related comments to their original state. In development, the implementation of SetExpectedCrc() changed, and there is no longer a need to track the CRC status in the refcount. Since the distinction between IsOne() and IsMutable() is subtle *and unused*, removing it now can help avoid subtle bugs in the future. This distinction can always be added back later, if it proves necessary. Keep the reserved bit for now; all it costs is one extra mask instruction in the refcount checks, and space for extra state in Cord is always hard to find. PiperOrigin-RevId: 408647038 -- ee67585cf66954176615271f50f8b278119dd138 by Greg Falcon <gfalcon@google.com>: Implement Cord::SetExpectedChecksum() and Cord::ExpectedChecksum(). SetExpectedChecksum() will store a uint32_t out-of-band alongside a Cord's data. This value persists through copies and assignments. Mutating operations on a Cord cause the value to be forgotten. ExpectedChecksum() retrieves the stored value, if present. This API is intended for storing a CRC32C checksum alongside data, allowing checksums to be passed through dataflows and validated at the final step. However, this API is agnostic to the meaning of the stored value. No CRC32C validation is performed by these new APIs. This implementation adds a new CordRep node, CordRepCrc. A CordRepCrc may (currently) only live at the top of a tree. This allows traversal logic to be agnostic to these nodes, instead putting the needed branches at the mutation level. This also implements the property requested from API review, that any mutation is guaranteed to permanently forget the stored CRC. PiperOrigin-RevId: 408611221 -- a86f592402b37c854ebdc77d2b9b425451a7a675 by Martijn Vels <mvels@google.com>: Move 'ExtractResult' into CordRep The result of an extract operation is logically identical for any tree implementation, and having a single type makes 'tree independent' implementation in cord.cc more concise. PiperOrigin-RevId: 408332408 -- baa7647e21db59a87f75af9cac62172ce38a0f71 by Abseil Team <absl-team@google.com>: Replace usages of `assert` macros with `ABSL_HARDENING_ASSERT`. PiperOrigin-RevId: 408272133 -- c7658133d8662c39fa5035fc93a364c7c3d327e0 by Martijn Vels <mvels@google.com>: Add CordRepBtree::ExtractAppendBuffer PiperOrigin-RevId: 407944179 -- 5775100363b5890ebfe710fadebf040445eab991 by Martijn Vels <mvels@google.com>: Add CordRepConcat::ExtractAppendBuffer PiperOrigin-RevId: 407932968 -- 9f520ba1600a93352c78f644a369c7c76195ee86 by Greg Falcon <gfalcon@google.com>: Add cordz tracking for crc nodes. This also adds a new kSetExpectedChecksum method to the list of tracked methods. This is presently unused but will be used soon. PiperOrigin-RevId: 407884120 GitOrigin-RevId: 83e4cdf03a4d702b30e69204060de09e462e23c6 Change-Id: I134ace2d87215813eaa60a282996a33884676c06
* Export of internal Abseil changesGravatar Abseil Team2021-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 93c607726d663800b4bfa472cba043fd3f5d0e97 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 389158822 -- 55b3bb50bbc168567c6ba25d07df2c2c39e864af by Martijn Vels <mvels@google.com>: Change CordRepRing alternative implementation to CordRepBtree alternative. This changes makes CordRepBtree (BTREE) the alternative to CordRepConcat (CONCAT) trees, enabled through the internal / experimental 'cord_btree_enabled' latch. PiperOrigin-RevId: 389030571 -- d6fc346143606c096bca8eb5029e4c429ac6e305 by Todd Lipcon <tlipcon@google.com>: Fix a small typo in SequenceLock doc comment PiperOrigin-RevId: 388972936 -- e46f9245dce8b4150e3ca2664e0cf42b75f90a83 by Martijn Vels <mvels@google.com>: Add 'shallow' validation mode to CordRepBtree which will be the default for internal assertions. PiperOrigin-RevId: 388753606 -- b5e74f163b490beb006f848ace67bb650433fe13 by Martijn Vels <mvels@google.com>: Add btree statistics to CordzInfo, and reduce rounding errors PiperOrigin-RevId: 388715878 -- 105bcbf80de649937e693b29b18220f9e6841a51 by Evan Brown <ezb@google.com>: Skip length checking when constructing absl::string_view from `const char*`. The length check causes unnecessary code bloat. PiperOrigin-RevId: 388271741 -- bed595158f24839efe49c65ae483f797d79fe0ae by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 387713428 GitOrigin-RevId: 93c607726d663800b4bfa472cba043fd3f5d0e97 Change-Id: I2a4840f5ffcd7f70b7d7d45cce66f23c42cf565f
* Export of internal Abseil changesGravatar Abseil Team2021-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 51e9291d9bc385082b4061fe760b236ba59c79c3 by Abseil Team <absl-team@google.com>: Cast to uint64_t using braces instead of parentheses. PiperOrigin-RevId: 372475909 -- 939fc409855da2639dcaf2d1d4971ca0e0568d03 by Martijn Vels <mvels@google.com>: Expand # flat nodes into size detailed counters. PiperOrigin-RevId: 372474608 -- 54b158c99b32f8a14821ce74fed0f9f836525ce7 by Martijn Vels <mvels@google.com>: Make copies of sampled cords sampled as well This applies to the following methods: - Cord(const Cord&) - operator=(const Cord&) - Subcord(...) PiperOrigin-RevId: 372468160 -- 876c2581ce008871464e8b471efbb967d150f83b by Andy Getzendanner <durandal@google.com>: Document the type of an ABSL_FLAGS.OnUpdate() callback. PiperOrigin-RevId: 372406390 GitOrigin-RevId: 51e9291d9bc385082b4061fe760b236ba59c79c3 Change-Id: Ifb75122cae56b66c28128aee90a63bbb28d93817
* Export of internal Abseil changesGravatar Abseil Team2021-05-04
-- 5d6734366ec54997df5234ac3b7e21015d7d5fde by Martijn Vels <mvels@google.com>: Increase slop for unit test to reduce flakiness of test PiperOrigin-RevId: 371935786 -- 6e97ff23e7f732ebf969bbc69102e5e677aae8cd by Martijn Vels <mvels@google.com>: Add node and memory usage stats analysis to GetCordzStatistics. PiperOrigin-RevId: 371893353 -- 17f7443e6f988f25efa25c2291c1cde191af2bf2 by Martijn Vels <mvels@google.com>: Add check on n == 0 in CordReader::ReadCord, which breaks invariants in the ring buffer code. PiperOrigin-RevId: 371738207 GitOrigin-RevId: 5d6734366ec54997df5234ac3b7e21015d7d5fde Change-Id: I0fc883f4f49f2380ab9afddbdfe6eb5ccc15dfc3