Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,514 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...m/insightfullogic/honest_profiler/core/aggregation/aggregator/FlatDiffAggregatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,66 @@ | |||
package com.insightfullogic.honest_profiler.core.aggregation.aggregator; | |||
|
|||
import java.util.Collection; | |||
|
|||
import org.junit.Test; | |||
import org.junit.runner.RunWith; | |||
import org.junit.runners.Parameterized; | |||
import org.junit.runners.Parameterized.Parameters; | |||
|
|||
import com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping; | |||
import com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping; | |||
import com.insightfullogic.honest_profiler.core.aggregation.result.diff.FlatDiff; | |||
import com.insightfullogic.honest_profiler.framework.ParameterUtil; | |||
import com.insightfullogic.honest_profiler.framework.checker.FlatDiffCheckAdapter; | |||
import com.insightfullogic.honest_profiler.framework.generator.FlatGenerator; | |||
import com.insightfullogic.honest_profiler.framework.scenario.SimplifiedLogScenario; | |||
|
|||
@RunWith(Parameterized.class) | |||
public class FlatDiffAggregatorTest | |||
{ | |||
@Parameters(name = "{0} <-> {1} : <{1},{2}>") | |||
public static Collection<Object[]> data() | |||
{ | |||
return ParameterUtil.getDiffScenariosAndGroupings(); | |||
} | |||
|
|||
// Instance Properties | |||
|
|||
private SimplifiedLogScenario baseScenario; | |||
private SimplifiedLogScenario newScenario; | |||
private ThreadGrouping threadGrouping; | |||
private FrameGrouping frameGrouping; | |||
|
|||
// Instance Constructors | |||
|
|||
public FlatDiffAggregatorTest(SimplifiedLogScenario baseScenario, | |||
SimplifiedLogScenario newScenario, | |||
ThreadGrouping threadGrouping, | |||
FrameGrouping frameGrouping) | |||
{ | |||
this.baseScenario = baseScenario; | |||
this.newScenario = newScenario; | |||
this.threadGrouping = threadGrouping; | |||
this.frameGrouping = frameGrouping; | |||
} | |||
|
|||
// Actual Test Method | |||
|
|||
@Test | |||
public void testScenario() | |||
{ | |||
FlatGenerator baseGen; | |||
FlatGenerator newGen; | |||
|
|||
baseGen = new FlatGenerator(threadGrouping, frameGrouping); | |||
baseScenario.executeAndEnd(baseGen); | |||
|
|||
newGen = new FlatGenerator(threadGrouping, frameGrouping); | |||
newScenario.executeAndEnd(newGen); | |||
|
|||
FlatDiff diff = new FlatDiff(); | |||
diff.set(baseGen.getFlat(), newGen.getFlat()); | |||
|
|||
baseScenario.checkFlatDiffAggregation(newScenario, new FlatDiffCheckAdapter(diff)); | |||
} | |||
} |
66 changes: 66 additions & 0 deletions
66
...m/insightfullogic/honest_profiler/core/aggregation/aggregator/TreeDiffAggregatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,66 @@ | |||
package com.insightfullogic.honest_profiler.core.aggregation.aggregator; | |||
|
|||
import java.util.Collection; | |||
|
|||
import org.junit.Test; | |||
import org.junit.runner.RunWith; | |||
import org.junit.runners.Parameterized; | |||
import org.junit.runners.Parameterized.Parameters; | |||
|
|||
import com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping; | |||
import com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping; | |||
import com.insightfullogic.honest_profiler.core.aggregation.result.diff.TreeDiff; | |||
import com.insightfullogic.honest_profiler.framework.ParameterUtil; | |||
import com.insightfullogic.honest_profiler.framework.checker.TreeDiffCheckAdapter; | |||
import com.insightfullogic.honest_profiler.framework.generator.TreeGenerator; | |||
import com.insightfullogic.honest_profiler.framework.scenario.SimplifiedLogScenario; | |||
|
|||
@RunWith(Parameterized.class) | |||
public class TreeDiffAggregatorTest | |||
{ | |||
@Parameters(name = "{0} <-> {1} : <{1},{2}>") | |||
public static Collection<Object[]> data() | |||
{ | |||
return ParameterUtil.getDiffScenariosAndGroupings(); | |||
} | |||
|
|||
// Instance Properties | |||
|
|||
private SimplifiedLogScenario baseScenario; | |||
private SimplifiedLogScenario newScenario; | |||
private ThreadGrouping threadGrouping; | |||
private FrameGrouping frameGrouping; | |||
|
|||
// Instance Constructors | |||
|
|||
public TreeDiffAggregatorTest(SimplifiedLogScenario baseScenario, | |||
SimplifiedLogScenario newScenario, | |||
ThreadGrouping threadGrouping, | |||
FrameGrouping frameGrouping) | |||
{ | |||
this.baseScenario = baseScenario; | |||
this.newScenario = newScenario; | |||
this.threadGrouping = threadGrouping; | |||
this.frameGrouping = frameGrouping; | |||
} | |||
|
|||
// Actual Test Method | |||
|
|||
@Test | |||
public void testScenario() | |||
{ | |||
TreeGenerator baseGen; | |||
TreeGenerator newGen; | |||
|
|||
baseGen = new TreeGenerator(threadGrouping, frameGrouping); | |||
baseScenario.executeAndEnd(baseGen); | |||
|
|||
newGen = new TreeGenerator(threadGrouping, frameGrouping); | |||
newScenario.executeAndEnd(newGen); | |||
|
|||
TreeDiff diff = new TreeDiff(); | |||
diff.set(baseGen.getTree(), newGen.getTree()); | |||
|
|||
baseScenario.checkTreeDiffAggregation(newScenario, new TreeDiffCheckAdapter(diff)); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.