From 1f32a9c5e139d0b07db116dcc6eb793c881ae272 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Tue, 30 May 2017 21:00:47 +0530 Subject: [PATCH] test/old: Removed commented code There were lot of commented code inside src/test/old/testcrush.cc. This was found while doing the PR#15364. Removed them. Signed-off-by: Jos Collin --- src/test/old/testcrush.cc | 47 --------------------------------------- 1 file changed, 47 deletions(-) diff --git a/src/test/old/testcrush.cc b/src/test/old/testcrush.cc index bd432b23ee95c..56bb7240eaafb 100644 --- a/src/test/old/testcrush.cc +++ b/src/test/old/testcrush.cc @@ -1,5 +1,3 @@ - - #include "../crush/crush.h" using namespace crush; @@ -9,19 +7,6 @@ using namespace crush; #include using namespace std; -/* -ostream& operator<<(ostream& out, vector& v) -{ - out << "["; - for (int i=0; i& d) { d.clear(); @@ -32,7 +17,6 @@ void make_disks(int n, int& no, vector& d) } } - Bucket *make_bucket(Crush& c, vector& wid, int h, int& ndisks, int& nbuckets) { if (h == 0) { @@ -44,7 +28,6 @@ Bucket *make_bucket(Crush& c, vector& wid, int h, int& ndisks, int& nbucket UniformBucket *b = new UniformBucket(nbuckets--, 1, 0, 10, disks); b->make_primes(hash); c.add_bucket(b); - //cout << h << " uniformbucket with " << wid[h] << " disks" << endl; return b; } else { // mixed @@ -54,7 +37,6 @@ Bucket *make_bucket(Crush& c, vector& wid, int h, int& ndisks, int& nbucket b->add_item(n->get_id(), n->get_weight()); } c.add_bucket(b); - //cout << h << " mixedbucket with " << wid[h] << endl; return b; } } @@ -74,7 +56,6 @@ int main() // crush Crush c; - // buckets vector disks; int root = -1; @@ -107,10 +88,7 @@ int main() c.add_bucket(&umb1); MixedBucket b(-100, 1); - //b.add_item(-2, ub1.get_weight()); b.add_item(-4, umb1.get_weight()); - //b.add_item(-2, ub2.get_weight()); - //b.add_item(-3, ub3.get_weight()); } if (0) { @@ -132,7 +110,6 @@ int main() for (int k=0; kadd_item(disks[k], 10); - //b->add_item(disks[j], 10); c.add_bucket(d); b->add_item(d->get_id(), d->get_weight()); } @@ -161,8 +138,6 @@ int main() root = make_hierarchy(c, wid, ndisks, nbuckets); } - - // rule int numrep = 1; @@ -172,19 +147,11 @@ int main() rule.steps.push_back(RuleStep(CRUSH_RULE_CHOOSE, numrep, 0)); } if (1) { - /* - rule.steps.push_back(RuleStep(CRUSH_RULE_TAKE, -4)); - rule.steps.push_back(RuleStep(CRUSH_RULE_CHOOSE, 2, 0)); - rule.steps.push_back(RuleStep(CRUSH_RULE_EMIT)); - */ rule.steps.push_back(RuleStep(CRUSH_RULE_TAKE, root)); rule.steps.push_back(RuleStep(CRUSH_RULE_CHOOSE, 1, 0)); rule.steps.push_back(RuleStep(CRUSH_RULE_EMIT)); } - //c.overload[10] = .1; - - int pg_per = 100; int numpg = pg_per*ndisks/numrep; @@ -213,14 +180,10 @@ int main() for (int xx=1; xx