-
Notifications
You must be signed in to change notification settings - Fork 61
OTA-4864 - improve binary file download progress logging #1756
OTA-4864 - improve binary file download progress logging #1756
Conversation
…ad proggress each 15 sec Signed-off-by: aodukha <[email protected]>
Signed-off-by: aodukha <[email protected]>
8b5b615
to
2faa877
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 <[email protected]>
Signed-off-by: aodukha <[email protected]>
Signed-off-by: aodukha <[email protected]>
There was a problem hiding this 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.
Log into output download progress each 15sec for big binary files