This commit is contained in:
gac-S_Changer
2020-09-08 11:53:11 +02:00
parent 226db0ad02
commit c85d4b4aa9
251 changed files with 19362 additions and 0 deletions

39
script/data/reports.py Normal file
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")