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

[log_files] Major fixes for log download #2234

Merged
merged 10 commits into from
Mar 1, 2024

Conversation

dakejahl
Copy link
Contributor

@dakejahl dakejahl commented Feb 27, 2024

Description

Fixes the log_files plugin. It's currently really broken and just barely works. I made a few posts in Discord if you want more information in rambling format https://discord.com/channels/1022170275984457759/1022185801615933460/1209702398650749030

Basically the current implementation continuously spams LOG_REQUEST_LIST and LOG_REQUEST_DATA and the logic for handling the incoming data is broken.

Before

This wireshark screenshot should give you a pretty good idea of the problem
Screenshot from 2024-02-20 21-09-58

After

I rewrote most of the code using the QGC implementation as a reference. It works reliably and much faster now.
Screenshot from 2024-02-26 18-33-37

Example

I'm working on an open source automatic log upload service for @AlexKlimaj and we will be regularly exercising this code. Check it out if you're interested! https://github.com/ARK-Electronics/logloader

Downloading...	2023-10-05T15:06:42Z	0.97249500MB	100%	3889.98000000 Kbps
Downloading...	2023-10-05T15:06:58Z	0.46985700MB	98%	3686.40000000 Kbps
Downloading...	2023-10-05T15:10:56Z0 Kb1.86199000MB	100%	4965.30666667 Kbps
Downloading...	2023-10-07T08:52:14Z	0.38373500MB	100%	inf Kbps
Downloading...	2023-10-07T08:56:18Z	0.26428000MB	100%	inf Kbps
Downloading...	2023-10-07T09:04:18Z	0.42428500MB	100%	3394.28000000 Kbps
Downloading...	2023-10-07T09:04:40Z	0.91263600MB	100%	7301.08800000 Kbps
Downloading...	2023-10-07T09:05:20Z	1.33783000MB	100%	3567.54666667 Kbps
Downloading...	2023-10-07T09:07:32Z	0.85526800MB	100%	3421.07200000 Kbps
Downloading...	2023-10-07T09:22:00Z	0.82437500MB	100%	6595.00000000 Kbps
Downloading...	2023-10-07T09:22:26Z	0.79509800MB	100%	6360.78400000 Kbps
Downloading...	2023-10-07T09:26:10Z	0.88394300MB	100%	3535.77200000 Kbps
Downloading...	2023-10-07T10:14:00Z	10.71558000MB	100%	2449.27542857 Kbps
Downloading...	2023-10-07T12:03:40Z	0.64674900MB	100%	5173.99200000 Kbps
Downloading...	2023-10-07T12:05:04Z	3.79014100MB	100%	3032.11280000 Kbps
Downloading...	2023-10-07T12:14:46Z	2.24213400MB	100%	2989.51200000 Kbps
Downloading...	2023-10-07T12:50:12Z	0.78112200MB	100%	3124.48800000 Kbps

@dakejahl dakejahl force-pushed the dev/log_files_redesign branch 3 times, most recently from be852e2 to 999fba9 Compare February 27, 2024 07:40
@dakejahl dakejahl force-pushed the dev/log_files_redesign branch from 999fba9 to b257191 Compare February 27, 2024 07:46
@dakejahl
Copy link
Contributor Author

Initially I had updated ProgressData with rate_kbps but then I realized I would have to change the proto file. Figured that was more effort than it's worth?

JonasVautherin
JonasVautherin previously approved these changes Feb 29, 2024
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow quite some effort here, thanks for that!

It looks good to me, and your graphs are quite convincing 😊.

Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the rewrite! I remember adding this one in a hurry.
I've added one commit with a few nitpicks, and things clang-tidy wanted.

I'll merge it as soon as CI sanity is restored.

Copy link

sonarqubecloud bot commented Mar 1, 2024

Quality Gate Passed Quality Gate passed

Issues
38 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@julianoes julianoes merged commit 88aba23 into mavlink:main Mar 1, 2024
28 checks passed
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

Successfully merging this pull request may close these issues.

3 participants