aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-memquota/src/mtracker/test.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* memquota: Add dedicated variant for duplicate child errorGabriela Moldovan2026-04-071-1/+2
|
* memquota: Add new Account::add_parent() APIGabriela Moldovan2026-03-301-0/+58
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* Merge branch 'mq-fix' into 'main'Ian Jackson2024-10-221-1/+1
|\ | | | | | | | | memquota: Fix account lifetime bugs, and arrange to test mq in shadow See merge request tpo/core/arti!2560
| * memquota: Fix a test not to rely on accessing cache with dead AccountIan Jackson2024-10-211-1/+1
| |
* | Convert a few crates to slotmap-carefulNeel Chauhan2024-10-171-3/+3
|/
* tor-memquota: Use clippy::arithmetic_side_effects, against panicsIan Jackson2024-09-101-0/+1
| | | | | | This detect possibly-panicking operations. Empirically this lint seems rather better now.
* byte_qty: Move to tor-basic-utilsIan Jackson2024-08-271-1/+1
| | | | Code motion of byte_qty.rs, and minimal necessary supporting changes.
* tor-memquota: Pass EnabledToken to IsParticipant methodsIan Jackson2024-08-191-6/+6
| | | | | | | This will hopefully allow much caller code to be compiled out. The users (IsParticipant impls) don't generally need to bother with it - they can just ignore it.
* tor-memquota: Support a no-op MemoryQuotaTrackerIan Jackson2024-08-191-5/+8
| | | | | | | | | | Wrap up most of the structures in IfEnabled. Sadly this diff is very noisy. I experimented with macros for the little enabled check at the start of each function but they didn't really help. We don't test this yet. We'll do a smoke test of this later.
* tor-memquota: Rename mby test helper fn to mbytesIan Jackson2024-08-151-16/+16
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
* tor-memquota: Add mq_queue, memory-quota-tracking (MPSC) queueIan Jackson2024-08-151-1/+1
|
* Merge branch 'memquota-typed' into 'main'Ian Jackson2024-07-241-23/+35
|\ | | | | | | | | tor-memquota: HasMemoryCost trait, and type-safe methods See merge request tpo/core/arti!2282
| * tor-memquota: Expose some test utilities for the rest of the crateIan Jackson2024-07-241-4/+7
| |
| * tor-memquota: Improve register_participant_with (fmt)Ian Jackson2024-07-241-18/+24
| |
| * tor-memquota: Improve register_participant_withIan Jackson2024-07-241-5/+8
| | | | | | | | | | Now the constructor is able to return other data to the caller, passing it through the mtracker machinery.
* | tor-memquota: Provide Participant::destroy_participantIan Jackson2024-07-241-0/+29
|/ | | | The stream wrapper is going to want this.
* Rename tor-memtrack to tor-memquotaIan Jackson2024-04-291-0/+678