Measure scan only

This commit is contained in:
Leeingnyo 2021-09-12 02:01:43 +09:00
parent d5847bb105
commit 0667f01471

View File

@ -98,6 +98,7 @@ class Library
end
def scan
start = Time.local
unless Dir.exists? @dir
Logger.info "The library directory #{@dir} does not exist. " \
"Attempting to create it"
@ -122,7 +123,8 @@ class Library
storage.bulk_insert_ids
storage.close
Logger.debug "Scan completed"
ms = (Time.local - start).total_milliseconds
Logger.debug "Scan completed. #{ms}ms"
Storage.default.mark_unavailable
end