Browse Source

ssh: Display the size of the store items being sent.

* guix/ssh.scm (send-files): Compute the size of MISSING and display
it.
gn-latest-20200428
Ludovic Courtès 3 years ago
parent
commit
b90d97ec2e
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      guix/ssh.scm

+ 8
- 3
guix/ssh.scm View File

@ -279,10 +279,15 @@ Return the list of store items actually sent."
(remove (cut valid-path? store <>)
',files)))))
(count (length missing))
(sizes (map (lambda (item)
(path-info-nar-size (query-path-info local item)))
missing))
(port (store-import-channel session)))
(format log-port (N_ "sending ~a store item to '~a'...~%"
"sending ~a store items to '~a'...~%" count)
count (session-get session 'host))
(format log-port (N_ "sending ~a store item (~h MiB) to '~a'...~%"
"sending ~a store items (~h MiB) to '~a'...~%" count)
count
(inexact->exact (round (/ (reduce + 0 sizes) (expt 2. 20))))
(session-get session 'host))
;; Send MISSING in topological order.
(export-paths local missing port)


Loading…
Cancel
Save