Skip to content

Commit

Permalink
Measure scan only
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeingnyo committed Sep 11, 2021
1 parent d5847bb commit 0667f01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library/library.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 0667f01

Please sign in to comment.