stats: added stats reporting to the upload helper

adds a stats_producer for the upload helper, which provides a series of counters
to the stats gatherer, under the name 'chk_upload_helper'.

it examines both the 'incoming' directory, and the 'encoding' dir, providing
inc_count inc_size inc_size_old enc_count enc_size enc_size_old, respectively
the number of files in each dir, the total size thereof, and the aggregate
size of all files older than 48hrs
This commit is contained in:
robk-tahoe
2008-03-25 18:19:08 -07:00
parent 4b68eb0d95
commit 5446ea5d67
2 changed files with 34 additions and 9 deletions

View File

@ -188,7 +188,7 @@ class Client(node.Node, testutil.PollMixin):
def init_helper(self):
d = self.when_tub_ready()
def _publish(self):
h = Helper(os.path.join(self.basedir, "helper"))
h = Helper(os.path.join(self.basedir, "helper"), self.stats_provider)
h.setServiceParent(self)
# TODO: this is confusing. BASEDIR/private/helper.furl is created
# by the helper. BASEDIR/helper.furl is consumed by the client