aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm33
1 files changed, 17 insertions, 16 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index f2b6bab..747d437 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -356,26 +356,27 @@ port. Also, the port used can be changed by passing the --port option.\n"
(output-progress bytes-transfered)
(continue-thunk)))
- (let* ((end-time (current-time time-utc))
- (elapsed (time-difference end-time
- start-time))
- (seconds-elapsed
- (+ (time-second elapsed)
- (/ (time-nanosecond elapsed) 1e9))))
- (display
- (simple-format
- #f
- "received ~A
+ (when length
+ (let* ((end-time (current-time time-utc))
+ (elapsed (time-difference end-time
+ start-time))
+ (seconds-elapsed
+ (+ (time-second elapsed)
+ (/ (time-nanosecond elapsed) 1e9))))
+ (display
+ (simple-format
+ #f
+ "received ~A
took ~A seconds
data transfered: ~AMB (~A bytes)
speed (MB/s): ~A
"
- (basename output-file-name)
- seconds-elapsed
- (format #f "~2,2f" (/ length 1000000))
- length
- (format #f "~2,2f" (/ (/ length 1000000)
- seconds-elapsed)))))))))
+ (basename output-file-name)
+ seconds-elapsed
+ (format #f "~2,2f" (/ length 1000000))
+ length
+ (format #f "~2,2f" (/ (/ length 1000000)
+ seconds-elapsed))))))))))
(define (controller request
method-and-path-components