Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

OTA-4864 - improve binary file download progress logging #1756

Merged

Conversation

aodukha
Copy link
Contributor

@aodukha aodukha commented Sep 8, 2020

Log into output download progress each 15sec for big binary files

…ad proggress each 15 sec

Signed-off-by: aodukha <aodukha@gmail.com>
Signed-off-by: aodukha <aodukha@gmail.com>
@aodukha aodukha force-pushed the feat/ota-4864/improve-binary-file-download-progress-logging branch from 8b5b615 to 2faa877 Compare September 8, 2020 11:09
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2020

Codecov Report

Merging #1756 into master will decrease coverage by 6.10%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1756      +/-   ##
==========================================
- Coverage   81.98%   75.88%   -6.11%     
==========================================
  Files         178      178              
  Lines       12481    13513    +1032     
==========================================
+ Hits        10233    10254      +21     
- Misses       2248     3259    +1011     
Impacted Files Coverage Δ
...tualizr/package_manager/packagemanagerinterface.cc 60.75% <66.66%> (-32.06%) ⬇️
src/libaktualizr/uptane/manifest.cc 60.31% <0.00%> (-39.69%) ⬇️
include/libaktualizr/aktualizr.h 66.66% <0.00%> (-33.34%) ⬇️
src/libaktualizr/primary/sotauptaneclient.cc 66.63% <0.00%> (-26.10%) ⬇️
include/libaktualizr/types.h 70.96% <0.00%> (-20.77%) ⬇️
src/libaktualizr/uptane/tuf.cc 71.98% <0.00%> (-19.52%) ⬇️
src/libaktualizr/primary/initializer.cc 72.08% <0.00%> (-19.41%) ⬇️
src/libaktualizr/storage/sql_utils.h 66.00% <0.00%> (-17.12%) ⬇️
src/libaktualizr/storage/sqlstorage.cc 64.18% <0.00%> (-14.70%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb9c8f7...f09d769. Read the comment docs.

Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

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

Cool, thanks! Normally we'd require a test to prove this works, but I don't think it's necessary here. I think if you could do a quick demo, that would suffice.

@@ -98,6 +112,7 @@ bool PackageManagerInterface::fetchTarget(const Uptane::Target& target, Uptane::
return true;
}
std::unique_ptr<DownloadMetaStruct> ds = std_::make_unique<DownloadMetaStruct>(target, progress_cb, token);
ds->time_start = ds->time_lastreport = std::chrono::steady_clock::now(); //use this time to report download progress it download take long time
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is time_start used for anything? Seems unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed. it was artifact from older and a bit more complicated version

Signed-off-by: aodukha <aodukha@gmail.com>
Signed-off-by: aodukha <aodukha@gmail.com>
Signed-off-by: aodukha <aodukha@gmail.com>
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! I tested locally and it worked as expected. Normally I would suggest squashing the fixup commits, but in this case I can do that when I merge.

@pattivacek pattivacek merged commit 6cc9ccc into master Sep 9, 2020
@pattivacek pattivacek deleted the feat/ota-4864/improve-binary-file-download-progress-logging branch September 9, 2020 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants