[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3883: The dependency of allmydata.stats.CPUUsageMonitor on foolscap is unnecessary
Tahoe-LAFS
trac at tahoe-lafs.org
Fri Mar 18 14:38:29 UTC 2022
#3883: The dependency of allmydata.stats.CPUUsageMonitor on foolscap is
unnecessary
---------------------+---------------------------
Reporter: exarkun | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: code | Version: n/a
Keywords: | Launchpad Bug:
---------------------+---------------------------
`allmydata.stats.CPUUsageMonitor` uses `foolscap.api.eventually` to
schedule collection of "the initial process CPU usage value" so that it is
collected only after the reactor has started - which corresponds to a time
after daemonization has completed and the right process will be sampled.
This is obsolete because Tahoe no longer uses `.tac` files to start up and
no longer offers any bespoke daemonization functionality itself.
`CPUUsageMonitor` can just sample the process CPU usage on construction or
in `startService`.
Removing the Foolscap dependency here simplifies and shortens the code.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3883>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list