aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-11-22 22:48:27 +0000
committerChristopher Baines <mail@cbaines.net>2021-11-22 22:48:27 +0000
commitc1289fc75e99be0e783a4a5a6bee63bdc5df1dde (patch)
treedc2746cb8cd1773da3a67b5efb6dd717e030e570 /guix-build-coordinator/agent-messaging
parent8690d84931d7f24362148285e3a9101b1569f21d (diff)
downloadbuild-coordinator-c1289fc75e99be0e783a4a5a6bee63bdc5df1dde.tar
build-coordinator-c1289fc75e99be0e783a4a5a6bee63bdc5df1dde.tar.gz
Improve some way numbers are displayed
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm31
1 files changed, 13 insertions, 18 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index 3e9f6ee..f7cdbb5 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -463,12 +463,10 @@ port. Also, the port used can be changed by passing the --port option.\n"
"
(basename output-file-name)
seconds-elapsed
- (rationalize (exact->inexact (/ bytes-read 1000000))
- 0.1)
+ (format #f "~2,2f" (/ bytes-read 1000000))
bytes-read
- (rationalize (/ (/ bytes-read 1000000)
- seconds-elapsed)
- 0.1))))
+ (format #f "~2,2f" (/ (/ bytes-read 1000000)
+ seconds-elapsed)))))
(begin
(put-bytevector output-port bv)
(loop (get-bytevector-some body)
@@ -485,10 +483,9 @@ port. Also, the port used can be changed by passing the --port option.\n"
~AMB read so far...
"
(basename output-file-name)
- (rationalize (exact->inexact
- (/ bytes-read
- 1000000))
- 0.1)))
+ (format #f "~2,2f"
+ (/ bytes-read
+ 1000000))))
bytes-read)
last-progress-update-bytes-read))))))))
@@ -601,12 +598,11 @@ port. Also, the port used can be changed by passing the --port option.\n"
"
(basename output-file-name)
seconds-elapsed
- (rationalize (exact->inexact (/ bytes-read 1000000))
- 0.1)
+ (format #f "~2,2f"
+ (/ bytes-read 1000000))
bytes-read
- (rationalize (/ (/ bytes-read 1000000)
- seconds-elapsed)
- 0.1))))
+ (format #f "~2,2f" (/ (/ bytes-read 1000000)
+ seconds-elapsed)))))
(begin
(put-bytevector output-port bv)
(loop (get-bytevector-some body)
@@ -623,10 +619,9 @@ port. Also, the port used can be changed by passing the --port option.\n"
~AMB read so far...
"
(basename output-file-name)
- (rationalize (exact->inexact
- (/ bytes-read
- 1000000))
- 0.1)))
+ (format #f "~2,2f"
+ (/ bytes-read
+ 1000000))))
bytes-read)
last-progress-update-bytes-read))))))
(close-port output-port))