This commit is contained in:
gac-S_Changer
2019-07-23 11:00:12 +02:00
parent 6a8de5b913
commit 1fd1297176
44 changed files with 494 additions and 93 deletions
+39
View File
@@ -0,0 +1,39 @@
from statsutils import *
def report(start, end):
"""
Data format for start and end: "dd/mm/yy" or "dd/mm/yy hh:mm:ss.mmm"
"""
cmds = ["mount%", "unmount%", "dry%", "recover%", "trash%", "robot_recover%", "scan%", "homing%"]
conn = get_stats_connection()
try:
print_stats(cmds, start, end)
for cmd in cmds:
print_cmd_stats (cmd, start, end)
finally:
conn.close()
def print_recs(cmd,start, end, result=("%%")):
"""
Data format for start and end: "dd/mm/yy" or "dd/mm/yy hh:mm:ss.mmm"
Result: "error", "abort, "success". Defaulr for all
"""
conn = get_stats_connection()
try:
print_cmd_records(cmd,start, end, result)
finally:
conn.close()
#Print all records:
#
#report("01/03/19","01/04/19")