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

Unified Diff: cycle_breaker.h

Issue 3618006: AU: Cyclebreaker optimization (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: unittest Created 10 years, 2 months 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 | cycle_breaker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cycle_breaker.h
diff --git a/cycle_breaker.h b/cycle_breaker.h
index 9c10c1749230e3531c2ab270272625705a1e7365..f1fa677446522e1668393c198548f58762efab8e 100644
--- a/cycle_breaker.h
+++ b/cycle_breaker.h
@@ -28,8 +28,11 @@ namespace chromeos_update_engine {
class CycleBreaker {
public:
+ CycleBreaker() : skipped_ops_(0) {}
// out_cut_edges is replaced with the cut edges.
void BreakCycles(const Graph& graph, std::set<Edge>* out_cut_edges);
+
+ size_t skipped_ops() const { return skipped_ops_; }
private:
void HandleCircuit();
@@ -44,6 +47,10 @@ class CycleBreaker {
Graph blocked_graph_; // "B" in the paper
std::set<Edge> cut_edges_;
+
+ // Number of operations skipped b/c we know they don't have any
+ // incoming edges.
+ size_t skipped_ops_;
};
} // namespace chromeos_update_engine
« no previous file with comments | « no previous file | cycle_breaker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698