This commit is contained in:
2025-08-21 16:25:52 +08:00
parent 1282e46138
commit b8b0295c5d
3 changed files with 311 additions and 10 deletions

View File

@@ -7,6 +7,9 @@ import zipfile
class Backend:
A1 = 130 / 60
A2 = f"{120 * 60 / 130:.0f}s"
def __init__(self, db="data.db"):
self.db_path = db
# 先解压
@@ -162,6 +165,7 @@ class Backend:
finally:
conn.close()
def get_statistics(self):
avg_all = self.get_avg_time()
avg_50 = self.get_avg_time(50)
@@ -172,12 +176,12 @@ class Backend:
[],
["最近50题正确率", f"{self.get_acc(50):.1f}/60%"],
["最近100题正确率", f"{self.get_acc(120):.1f}/60%"],
["平均耗时", f"{avg_all:.1f}/72s"],
["预计做完用时", f"{avg_all * 1.667:.1f}/120min"],
["50平均耗时", f"{avg_50:.1f}/72s"],
["预计做完用时", f"{avg_50 * 1.667:.1f}/120min"],
["120平均耗时", f"{avg_100:.1f}/72s"],
["预计做完用时", f"{avg_100 * 1.667:.1f}/120min"],
["平均耗时", f"{avg_all:.1f}/{self.A2}"],
["预计做完用时", f"{avg_all * self.A1:.1f}/120min"],
["50平均耗时", f"{avg_50:.1f}/{self.A2}"],
["预计做完用时", f"{avg_50 * self.A1:.1f}/120min"],
["120平均耗时", f"{avg_100:.1f}/{self.A2}"],
["预计做完用时", f"{avg_100 * self.A1:.1f}/120min"],
]
return result
@@ -192,7 +196,6 @@ class Backend:
def set_config(self,a,b):
self.title_filter = a
self.global_filter = ""
if len(b)>0:
self.global_filter = " and ( FALSE "