Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file-server: add --progress option #112

Open
maksimdrachov opened this issue Aug 29, 2024 · 3 comments
Open

file-server: add --progress option #112

maksimdrachov opened this issue Aug 29, 2024 · 3 comments

Comments

@maksimdrachov
Copy link
Member

image

I would like to add something minimal like this as an option to yakut file-server.

Reason being is that as part of the presentation at DroneX, I would like to show how easy it is to update the firmware on one of our Cyphal-enabled devices (FluxGrip). However, the currently available --verbose option just prints out the a bunch of unintelligible gobbledygook.

https://pypi.org/project/progressbar2/

@pavel-kirienko
Copy link
Member

pavel-kirienko commented Aug 29, 2024

For the file server itself there is no such thing as progress because there's no guarantee that clients will be reading files in their entirety, nor doing it sequentially. We could display the last read offset per client and per file though, like <file>, client <node-ID>, offset <offset> bytes of <file-size> bytes (this is crude but you get the idea). If the client is doing random reads then the value will also jump randomly, but there's little we can do about that.

@maksimdrachov
Copy link
Member Author

Are there many use cases where the client would be reading the file:

  • not in its entirety
  • not sequentially

I'm assuming file-server is mostly used for binary image uploads? Perhaps we can document then that --progress is meant to be used in those cases?

Your proposal barely contains more information than what we already have (using the --verbose option).

I'm mostly interesting in the ETA (and percentage, load bar and elapsed time are also nice to have).

@pavel-kirienko
Copy link
Member

We have two solutions that require the same amount of effort to implement: a general one and a specialized one. It makes sense to prefer the general one. --verbose is not an adequate substitute because it emits a lot of information that is mostly irrelevant if one is looking to track the file IO. Also, --verbose does not group states per remote node, per file, and does not provide the file size, thus making the progress information unavailable. If you want something that looks like a progress bar, we could display the last read offset as a progress bar (not sure if it makes a lot of sense though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants