Script execution

This commit is contained in:
2019-04-02 11:06:51 +02:00
parent ddb42cb639
commit b45c6c34c0

View File

@@ -44,8 +44,12 @@ def _get_count(sql):
def get_count(command= "%%", start = None, end = None, result= "%%"):
sql = "Command LIKE '"+ command +"' AND Result LIKE '"+ result +"'"
if start:
if len(start)==8:
start = start + " 00:00:00.000"
sql = sql + " AND Start>='" + start + "'"
if end:
if len(end)==8:
end = end + " 00:00:00.000"
sql = sql + " AND (\"End\"<'" + end + "')"
return _get_count(sql)
@@ -64,10 +68,9 @@ def print_stats(command = "%", start = None, end = None):
print "Abort: ", ("%1.2f%% of %d" % ((float(a)/t) * 100, t))
cmd = "%test1.py"
start= "06/02/19 13:27:56.124"
end= "29/04/19 13:27:56.124"
start= "06/02/19" #"06/02/19 13:27:56.124"
end= "07/04/19" #"29/04/19 13:27:56.124"
print _get_count("Result LIKE 'success' AND \"End\">='06/02/19 13:27:56.124'")
print_stats ("%test1.py", start, end)