mirror of https://github.com/apache/druid.git
cleaned up comments
This commit is contained in:
parent
bcb3e089d8
commit
a03dcc6429
|
@ -124,23 +124,7 @@ public class DruidMasterBalancer implements DruidMasterHelper
|
|||
}
|
||||
}
|
||||
|
||||
// final double initialTotalCost = analyzer.calculateInitialTotalCost(serverHolderList);
|
||||
// final double normalization = analyzer.calculateNormalization(serverHolderList);
|
||||
// final double normalizedInitialCost = initialTotalCost / normalization;
|
||||
|
||||
// stats.addToTieredStat("initialCost", tier, (long) initialTotalCost);
|
||||
// stats.addToTieredStat("normalization", tier, (long) normalization);
|
||||
// stats.addToTieredStat("normalizedInitialCostTimesOneThousand", tier, (long) (normalizedInitialCost * 1000));
|
||||
stats.addToTieredStat("movedCount", tier, currentlyMovingSegments.get(tier).size());
|
||||
|
||||
// log.info(
|
||||
// "Segments Moved: [%d]",
|
||||
// tier,
|
||||
//// initialTotalCost,
|
||||
//// normalization,
|
||||
//// normalizedInitialCost,
|
||||
// currentlyMovingSegments.get(tier).size()
|
||||
// );
|
||||
}
|
||||
|
||||
return params.buildFromExisting()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.metamx.druid.master;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
@ -17,6 +18,7 @@ import org.junit.Test;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class DruidMasterBalancerProfiler
|
||||
{
|
||||
|
@ -62,6 +64,8 @@ public class DruidMasterBalancerProfiler
|
|||
|
||||
@Test
|
||||
public void profileRun(){
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.start();
|
||||
LoadQueuePeonTester fromPeon = new LoadQueuePeonTester();
|
||||
LoadQueuePeonTester toPeon = new LoadQueuePeonTester();
|
||||
|
||||
|
@ -110,11 +114,8 @@ public class DruidMasterBalancerProfiler
|
|||
.withMaxSegmentsToMove(MAX_SEGMENTS_TO_MOVE)
|
||||
.withBalancerReferenceTimestamp(new DateTime("2013-01-01"))
|
||||
.build();
|
||||
for (int i=0;i<1000;i++)
|
||||
{
|
||||
params = new DruidMasterBalancerTester(master).run(params);
|
||||
}
|
||||
|
||||
System.out.println(stopwatch.elapsed(TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue