From 48525a639dfbf28bc02ac4aa30c702293a788323 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 8 May 2023 20:42:31 +0100 Subject: Make logging conditional on the request content length --- .../agent-messaging/http/server.scm | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'guix-build-coordinator/agent-messaging/http/server.scm') 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 -- cgit v1.2.3