From aa1f8cf8b7a36ab0afcc82f302d688037aa4cb1c Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Tue, 20 Nov 2012 10:48:31 -0500 Subject: [PATCH] Add Libra statistics worker framework. The statistics worker (libra_statsd) is designed to run on a server and act as a collection point for statistics from Libra worker processs. The workers will send their statistics to libra_statsd via a common Gearman function. These stats will be stored in a database for consumption by other processes. Change-Id: Ia9e7400275459fc43dce580146ca6b28cf367b3f --- libra/statsd/__init__.py | 13 +++++++++++++ libra/statsd/main.py | 17 +++++++++++++++++ setup.py | 1 + 3 files changed, 31 insertions(+) create mode 100644 libra/statsd/__init__.py create mode 100644 libra/statsd/main.py diff --git a/libra/statsd/__init__.py b/libra/statsd/__init__.py new file mode 100644 index 00000000..582348cb --- /dev/null +++ b/libra/statsd/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. diff --git a/libra/statsd/main.py b/libra/statsd/main.py new file mode 100644 index 00000000..caf22ca0 --- /dev/null +++ b/libra/statsd/main.py @@ -0,0 +1,17 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +def main(): + return 0 diff --git a/setup.py b/setup.py index ff20b48d..b1761184 100644 --- a/setup.py +++ b/setup.py @@ -77,6 +77,7 @@ setuptools.setup( 'libra_worker = libra.worker.main:main', 'libra_pool_mgm = libra.mgm.mgm:main', 'libra_client = libra.client.client:main', + 'libra_statsd = libra.statsd.main:main', ] }, cmdclass=ci_cmdclass,