-
Committer:
Ubuntu CI Bot
-
Author(s):
Joe Talbott
-
Date:
2014-04-23 16:38:22 UTC
-
mfrom:
(414.4.5 add_txstatsd)
-
Revision ID:
ubuntu_ci_bot-20140423163822-7uctefi9qp9682v4
[r=Francis Ginther, PS Jenkins bot] stats - Add txstatsd support and a reference usage to bsbuilder.
* Requires python-txstatsd (which is available in our Phase0 ppa)
- if not installed the class and its methods become NOPs.
* Requires stats_config.py in the root directory of the branch
- contents should be 'TXSTATSD_ADDRESS="<IP>"'
- this isn't hooked into a relation change hook yet.
EXAMPLE
from ci_utils import stats
metric = stats.Metric("source_package_upload_success", prefix="bsbuilder")
# start timekeeping
metric.start()
# successfully upload a package
# stop timekeeping
metric.stop()
# publish results to txstatsd, optionally with a new metric name and prefix
metric.publish() from Joe Talbott