summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-05-15 02:32:39 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-05-15 02:32:39 +0000
commit4c05d2e4db46e319890f0052790eebaf1d2c029b (patch)
tree315e6fe1a7333fd47cc7f0693bbe2a2e22e02d91 /src/lib/Server/Admin
parente8cfb7fbe5bdcabacfb1ad1e75fe24e6439c132c (diff)
downloadbcfg2-4c05d2e4db46e319890f0052790eebaf1d2c029b.tar.gz
bcfg2-4c05d2e4db46e319890f0052790eebaf1d2c029b.tar.bz2
bcfg2-4c05d2e4db46e319890f0052790eebaf1d2c029b.zip
Implement count field for statistics
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5236 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r--src/lib/Server/Admin/Perf.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Perf.py b/src/lib/Server/Admin/Perf.py
index 0cbb93e17..3d17372e0 100644
--- a/src/lib/Server/Admin/Perf.py
+++ b/src/lib/Server/Admin/Perf.py
@@ -13,7 +13,7 @@ class Perf(Bcfg2.Server.Admin.Mode):
Bcfg2.Server.Admin.Mode.__init__(self, configfile)
def __call__(self, args):
- output = [('Name', 'Min', 'Max', 'Mean')]
+ output = [('Name', 'Min', 'Max', 'Mean', 'Count')]
optinfo = {
'server': Bcfg2.Options.SERVER_LOCATION,
'user': Bcfg2.Options.CLIENT_USER,
@@ -32,6 +32,7 @@ class Perf(Bcfg2.Server.Admin.Mode):
ca = setup['ca'])
data = proxy.get_statistics()
for key, value in data.iteritems():
- output.append((key, ) + tuple(["%.06f" % (item) for item in value]))
+ data = tuple(["%.06f" % (item) for item in value[:-1]] + [value[-1]])
+ output.append((key, ) + data)
self.print_table(output)