Add more time logging in to insert-missing-derivations
This commit is contained in:
parent
7da355b034
commit
bbbcea8ff6
1 changed files with 58 additions and 58 deletions
|
|
@ -1623,8 +1623,9 @@ LIMIT $1"
|
||||||
" RETURNING id"
|
" RETURNING id"
|
||||||
";"))
|
";"))
|
||||||
|
|
||||||
|
(with-time-logging
|
||||||
(simple-format
|
(simple-format
|
||||||
#t "debug: insert-missing-derivations: inserting ~A derivations\n"
|
#f "insert-missing-derivations: inserting ~A derivations"
|
||||||
(length derivations))
|
(length derivations))
|
||||||
(let ((derivation-ids
|
(let ((derivation-ids
|
||||||
(append-map
|
(append-map
|
||||||
|
|
@ -1634,26 +1635,26 @@ LIMIT $1"
|
||||||
(exec-query conn (insert-into-derivations chunk))))
|
(exec-query conn (insert-into-derivations chunk))))
|
||||||
(chunk derivations 500))))
|
(chunk derivations 500))))
|
||||||
|
|
||||||
(simple-format
|
(with-time-logging
|
||||||
#t "debug: insert-missing-derivations: updating hash table\n")
|
"insert-missing-derivations: updating hash table"
|
||||||
(for-each (lambda (derivation derivation-id)
|
(for-each (lambda (derivation derivation-id)
|
||||||
(hash-set! derivation-ids-hash-table
|
(hash-set! derivation-ids-hash-table
|
||||||
(derivation-file-name derivation)
|
(derivation-file-name derivation)
|
||||||
derivation-id))
|
derivation-id))
|
||||||
derivations
|
derivations
|
||||||
derivation-ids)
|
derivation-ids))
|
||||||
|
|
||||||
(simple-format
|
(with-time-logging
|
||||||
#t "debug: insert-missing-derivations: inserting outputs\n")
|
"insert-missing-derivations: inserting outputs"
|
||||||
(for-each (lambda (derivation-id derivation)
|
(for-each (lambda (derivation-id derivation)
|
||||||
(insert-derivation-outputs conn
|
(insert-derivation-outputs conn
|
||||||
derivation-id
|
derivation-id
|
||||||
(derivation-outputs derivation)))
|
(derivation-outputs derivation)))
|
||||||
derivation-ids
|
derivation-ids
|
||||||
derivations)
|
derivations))
|
||||||
|
|
||||||
(simple-format
|
(with-time-logging
|
||||||
#t "debug: insert-missing-derivations: inserting sources\n")
|
"insert-missing-derivations: inserting sources"
|
||||||
(for-each (lambda (derivation-id derivation)
|
(for-each (lambda (derivation-id derivation)
|
||||||
(let ((sources (derivation-sources derivation)))
|
(let ((sources (derivation-sources derivation)))
|
||||||
(unless (null? sources)
|
(unless (null? sources)
|
||||||
|
|
@ -1668,15 +1669,14 @@ LIMIT $1"
|
||||||
sources-ids
|
sources-ids
|
||||||
sources)))))
|
sources)))))
|
||||||
derivation-ids
|
derivation-ids
|
||||||
derivations)
|
derivations))
|
||||||
|
|
||||||
(simple-format
|
|
||||||
#t "debug: insert-missing-derivations: ensure-input-derivations-exist\n")
|
|
||||||
|
|
||||||
|
(with-time-logging
|
||||||
|
"insert-missing-derivations: ensure-input-derivations-exist"
|
||||||
(ensure-input-derivations-exist (deduplicate-strings
|
(ensure-input-derivations-exist (deduplicate-strings
|
||||||
(map derivation-input-path
|
(map derivation-input-path
|
||||||
(append-map derivation-inputs
|
(append-map derivation-inputs
|
||||||
derivations))))
|
derivations)))))
|
||||||
|
|
||||||
(with-time-logging
|
(with-time-logging
|
||||||
(simple-format
|
(simple-format
|
||||||
|
|
@ -1686,7 +1686,7 @@ LIMIT $1"
|
||||||
derivation-ids
|
derivation-ids
|
||||||
derivations))
|
derivations))
|
||||||
|
|
||||||
derivation-ids))
|
derivation-ids)))
|
||||||
|
|
||||||
(define (select-derivations-by-id conn ids)
|
(define (select-derivations-by-id conn ids)
|
||||||
(define query
|
(define query
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue