diff options
author | Florian Klink <flokli@flokli.de> | 2024-06-16T16·22+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-06-17T12·57+0000 |
commit | 28b692fd507b5a32add96e3694bd1f2959bd9608 (patch) | |
tree | 945ed9c6feafb45a7fc1b366b7d5254064213134 /tvix/glue | |
parent | cfab953094c6da5a919ea968f2bd7753035005c7 (diff) |
feat(tvix/tvix-store): improve progress bars r/8289
Don't show an empty spinner for daemon commands. Move the bar to the right, so the text is better aligned between spinner progress and bar progress styles. Generally, push progress bars a bit more down to the place where we can track progress. This includes adding one in the upload_blob span. Introduce another progress style template for transfers, which interprets the counter as bytes (not just a plain integer), and also a data rate. Use it for here and in the fetching code, and also make the progress bar itself a bit less wide. Change-Id: I15c2ea3d2b24b5186cec19cd3dbd706638497f40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11845 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Simon Hauser <simon.hauser@helsinki-systems.de>
Diffstat (limited to 'tvix/glue')
-rw-r--r-- | tvix/glue/src/fetchers/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/glue/src/fetchers/mod.rs b/tvix/glue/src/fetchers/mod.rs index aee79b2e7504..6cce569e9799 100644 --- a/tvix/glue/src/fetchers/mod.rs +++ b/tvix/glue/src/fetchers/mod.rs @@ -222,7 +222,7 @@ impl<BS, DS, PS, NS> Fetcher<BS, DS, PS, NS> { .await?; span.pb_set_length(f.metadata().await?.len()); - span.pb_set_style(&tvix_tracing::PB_PROGRESS_STYLE); + span.pb_set_style(&tvix_tracing::PB_TRANSFER_STYLE); span.pb_start(); Ok(Box::new(tokio::io::BufReader::new(InspectReader::new( f, @@ -236,9 +236,9 @@ impl<BS, DS, PS, NS> Fetcher<BS, DS, PS, NS> { if let Some(content_length) = resp.content_length() { span.pb_set_length(content_length); - span.pb_set_style(&tvix_tracing::PB_PROGRESS_STYLE); + span.pb_set_style(&tvix_tracing::PB_TRANSFER_STYLE); } else { - span.pb_set_style(&tvix_tracing::PB_SPINNER_STYLE); + span.pb_set_style(&tvix_tracing::PB_TRANSFER_STYLE); } span.pb_start(); |