[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #25950 [Core Tor/Tor]: Run "accounting_run_housekeeping" with a periodic event.
#25950: Run "accounting_run_housekeeping" with a periodic event.
-------------------------------------------------+-------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status:
| assigned
Priority: Medium | Milestone: Tor:
| 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: 034-roadmap-subtask, | Actual Points:
034-triage-20180328, 034-included-20180328 |
Parent ID: #25375 | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Description changed by nickm:
Old description:
New description:
Here's an implementation sketch:
* Make accounting_add_bytes() check whether limits are exceeded.
Refactor the code as needed to make this check fast.
* If a limit is exceeded, schedule consider_hibernation().
* Also schedule consider_hibernation() again based on "shutdown_time",
"hibernate_end_time", and "interval_wakeup_time".
* Pull "accounting_run_housekeeping" apart:
* Other logic to set interval_end_time if it isn't set but accounting
is enabled.
* A periodic event, only scheduled when network is on and accounting
is enabled, to record bandwidth usage. Tie this into the or_state_save
event.
--
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25950#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs