Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1691)

Unified Diff: delta_diff_generator.cc

Issue 4243006: AU: Delta diff generator shows progress % when generating full updates. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: white space Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_diff_generator.cc
diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc
index b2d4c69025746af126cedc8aa326ca6808ed45ed..64c17661d980dbede9eeb492bcab025a535f4b67 100644
--- a/delta_diff_generator.cc
+++ b/delta_diff_generator.cc
@@ -949,7 +949,7 @@ bool ConvertCutsToFull(
deleted_nodes.insert(it->new_vertex);
}
deleted_nodes.insert(cuts[0].old_dst);
-
+
vector<Vertex::Index> new_op_indexes;
new_op_indexes.reserve(op_indexes->size());
for (vector<Vertex::Index>::iterator it = op_indexes->begin(),
@@ -995,7 +995,7 @@ bool AssignBlockForAdjoiningCuts(
}
LOG(INFO) << "Need to find " << blocks_needed << " blocks for "
<< cuts.size() << " cuts";
-
+
// Find enough blocks
ExtentRanges scratch_ranges;
// Each block that's supplying temp blocks and the corresponding blocks:
@@ -1063,7 +1063,7 @@ bool AssignBlockForAdjoiningCuts(
old_dst,
it->second.GetExtentsForBlockCount(it->second.blocks()));
}
-
+
// Replace temp blocks in each cut
for (vector<CutEdgeVertexes>::const_iterator it = cuts.begin(),
e = cuts.end(); it != e; ++it) {
@@ -1342,7 +1342,6 @@ bool DeltaDiffGenerator::ReadFullUpdateFromDisk(
for (off_t bytes_left = part_sizes[partition], counter = 0, offset = 0;
bytes_left > 0;
bytes_left -= chunk_size, ++counter, offset += chunk_size) {
- LOG(INFO) << "offset = " << offset;
DeltaArchiveManifest_InstallOperation* op = NULL;
if (partition == 0) {
graph->resize(graph->size() + 1);
@@ -1353,10 +1352,8 @@ bool DeltaDiffGenerator::ReadFullUpdateFromDisk(
kernel_ops->resize(kernel_ops->size() + 1);
op = &kernel_ops->back();
}
- LOG(INFO) << "have an op";
vector<char> buf(min(bytes_left, chunk_size));
- LOG(INFO) << "buf size: " << buf.size();
ssize_t bytes_read = -1;
TEST_AND_RETURN_FALSE(utils::PReadAll(
@@ -1380,6 +1377,10 @@ bool DeltaDiffGenerator::ReadFullUpdateFromDisk(
Extent* dst_extent = op->add_dst_extents();
dst_extent->set_start_block(offset / kBlockSize);
dst_extent->set_num_blocks(chunk_size / kBlockSize);
+
+ LOG(INFO) << StringPrintf("%.1f", offset * 100.0 / part_sizes[partition])
adlr 2010/11/03 18:41:51 how many lines does this produce? Maybe we should
petkov 2010/11/03 18:43:55 850 I guess? I'm OK with verbose output as long as
+ << "% complete (offset: " << offset << ", buf size: "
+ << buf.size() << ")";
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698