chore: update documentation, benchmark tests, and database migration with author birth years and book published years

This commit is contained in:
2026-01-29 07:06:31 +00:00
parent 5a2a16f0ff
commit 6b64e96abe
38 changed files with 1522 additions and 10231 deletions
+5 -4
View File
@@ -4,11 +4,12 @@ import time
try:
with open('usage.log', 'a') as log_file:
while True:
cpu_percent = psutil.cpu_percent(interval=1)
cpu = psutil.cpu_percent(interval=1)
mem = psutil.virtual_memory()
log_entry = f"CPU: {cpu_percent}%, Memory: {mem.percent}%\n"
timestamp = time.strftime('%Y-%m-%d %H:%M:%S')
log_entry = f"{timestamp} CPU: {cpu}% Memory: {mem.percent}%\n"
log_file.write(log_entry)
log_file.flush()
time.sleep(4)
time.sleep(4) # Already waited 1 sec in cpu_percent, so sleep 4 more to total 5
except KeyboardInterrupt:
print("Monitoring stopped by user.")
print("Monitoring stopped by user.")"}