summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Core.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-29 15:06:49 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-29 15:09:44 -0400
commit1e53d240e75d3000d16e706fde5d288d2490afe4 (patch)
tree3a3e584c4f48b22e15bc5015bbd7c0f4b6776c70 /src/lib/Bcfg2/Server/Core.py
parentcc3b114d8fe6c85ba4e3a187a70e43d9bd59c5e3 (diff)
downloadbcfg2-1e53d240e75d3000d16e706fde5d288d2490afe4.tar.gz
bcfg2-1e53d240e75d3000d16e706fde5d288d2490afe4.tar.bz2
bcfg2-1e53d240e75d3000d16e706fde5d288d2490afe4.zip
made bcfg2-admin perf work again
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r--src/lib/Bcfg2/Server/Core.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index dc29f45eb..4ff0d2b98 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -14,6 +14,7 @@ import Bcfg2.settings
import Bcfg2.Server
import Bcfg2.Logger
import Bcfg2.Server.FileMonitor
+from Bcfg2.Statistics import Statistics
from Bcfg2.Compat import xmlrpclib, reduce
from Bcfg2.Server.Plugin import PluginInitError, PluginExecutionError
@@ -174,6 +175,8 @@ class BaseCore(object):
self.fam_thread.start()
self.fam.AddMonitor(self.cfile, self.setup)
+ self.instance_statistics = Statistics()
+
def plugins_by_type(self, base_cls):
"""Return a list of loaded plugins that match the passed type.
@@ -638,3 +641,7 @@ class BaseCore(object):
"""Is the database configured and available"""
return self._database_available
+ @exposed
+ def get_statistics(self, _):
+ """Get current statistics about component execution"""
+ return self.instance_statistics.display()