Opened at 2022-03-18T14:38:29Z
Closed at 2022-03-24T12:09:46Z
#3883 closed defect (fixed)
The dependency of allmydata.stats.CPUUsageMonitor on foolscap is unnecessary
Reported by: | exarkun | Owned by: | GitHub <noreply@…> |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | code | Version: | n/a |
Keywords: | review | Cc: | |
Launchpad Bug: |
Description
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.
Change History (2)
comment:1 Changed at 2022-03-18T16:31:06Z by exarkun
- Keywords review added
comment:2 Changed at 2022-03-24T12:09:46Z by GitHub <noreply@…>
- Owner set to GitHub <noreply@…>
- Resolution set to fixed
- Status changed from new to closed
In f480551/trunk:
https://github.com/tahoe-lafs/tahoe-lafs/pull/1186