diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-08 20:42:31 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-08 20:42:31 +0100 |
commit | 48525a639dfbf28bc02ac4aa30c702293a788323 (patch) | |
tree | dbab6d6bdf97633d2e77e0b64d415a4ce741745c /guix-build-coordinator | |
parent | 0ee9ce1b3755706cf5e283e4612b68581c4be37e (diff) | |
download | build-coordinator-48525a639dfbf28bc02ac4aa30c702293a788323.tar build-coordinator-48525a639dfbf28bc02ac4aa30c702293a788323.tar.gz |
Make logging conditional on the request content length
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http/server.scm | 33 |
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 |