#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: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:

Merge pull request #1186 from tahoe-lafs/3883.drop-cpuusagemonitor-foolscap-dep

Drop the Foolscap dependency in allmydata.stats

Fixes: ticket:3883

Note: See TracTickets for help on using tickets.