mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Measure scan only
This commit is contained in:
parent
d5847bb105
commit
0667f01471
@ -98,6 +98,7 @@ class Library
|
|||||||
end
|
end
|
||||||
|
|
||||||
def scan
|
def scan
|
||||||
|
start = Time.local
|
||||||
unless Dir.exists? @dir
|
unless Dir.exists? @dir
|
||||||
Logger.info "The library directory #{@dir} does not exist. " \
|
Logger.info "The library directory #{@dir} does not exist. " \
|
||||||
"Attempting to create it"
|
"Attempting to create it"
|
||||||
@ -122,7 +123,8 @@ class Library
|
|||||||
storage.bulk_insert_ids
|
storage.bulk_insert_ids
|
||||||
storage.close
|
storage.close
|
||||||
|
|
||||||
Logger.debug "Scan completed"
|
ms = (Time.local - start).total_milliseconds
|
||||||
|
Logger.debug "Scan completed. #{ms}ms"
|
||||||
Storage.default.mark_unavailable
|
Storage.default.mark_unavailable
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user