Script execution
This commit is contained in:
@@ -92,15 +92,13 @@ def get_commands(commands =None, start = None, end = None):
|
||||
def print_cmd_stats(command = "%", start = None, end = None):
|
||||
print "-----------------------------------------------------------"
|
||||
print "Statistics from ", start , " to ", end
|
||||
print "Command: " , command
|
||||
(s,a,e) = get_cmd_stats(command, start, end)
|
||||
t=s+a+e #get_count(command, start, end, "%")
|
||||
if t==0:
|
||||
print "No records"
|
||||
else:
|
||||
print "Success: ", ("%1.2f%% of %d" % ((float(s)/t) * 100, t))
|
||||
print "Error: ", ("%1.2f%% of %d" % ((float(e)/t) * 100, t))
|
||||
print "Abort: ", ("%1.2f%% of %d" % ((float(a)/t) * 100, t))
|
||||
print "Command: " , command , " Records: ", t
|
||||
if t>0:
|
||||
print "%-10s %7.2f%% - %d" % ("Success", (float(s)/t) * 100, s)
|
||||
print "%-10s %7.2f%% - %d" % ("Abort", (float(a)/t) * 100, a)
|
||||
print "%-10s %7.2f%% - %d" % ("Error", (float(e)/t) * 100, e)
|
||||
|
||||
print "\nErrors:"
|
||||
print "%5s %s" % ("Count", "Error")
|
||||
|
||||
Reference in New Issue
Block a user