Skip to content

Commit

Permalink
Better naming and updated some javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
PhRX committed Jan 31, 2017
1 parent 47d42e2 commit 55e8b5e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
Expand Up @@ -18,17 +18,13 @@
import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode; import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode;


/** /**
* Aggregator which takes an {@link AggregationProfile}, and uses the data to aggregate the values into trees of * Aggregator which takes an {@link Entry} and aggregates the ancestors into a {@link Tree}.
* {@link Node}s aggregated by FQMN.
*/ */
public class CallingTreeAggregator implements Aggregator<Entry<String>, String, Node<String>> public class AncestorTreeAggregator implements Aggregator<Entry<String>, String, Node<String>>
{ {
// Aggregator Implementation // Aggregator Implementation


/** /**
* Iterate over the top-level {@link LeanNode}s containing the thread-level information, and recursively traverse
* the descendants, aggregating them on each level by FQMN.
*
* @see Aggregator#aggregate(Object, LeanNode) * @see Aggregator#aggregate(Object, LeanNode)
*/ */
@Override @Override
Expand Down
Expand Up @@ -13,10 +13,10 @@
import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode; import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode;


/** /**
* Aggregator which takes a {@link Node}, and aggregates the values of the {@link Node} and its descendants into a list * Aggregator which takes a {@link Node}, and aggregates the values of the {@link Node} and its descendants into a
* of {@link Entry}s. * {@link Flat}.
*/ */
public class NodeDescendantAggregator implements Aggregator<Node<String>, String, Entry<String>> public class DescendantFlatAggregator implements Aggregator<Node<String>, String, Entry<String>>
{ {
/** /**
* This method aggregates a {@link Node} and all its all descendants. * This method aggregates a {@link Node} and all its all descendants.
Expand Down
Expand Up @@ -18,17 +18,13 @@
import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode; import com.insightfullogic.honest_profiler.core.profiles.lean.LeanNode;


/** /**
* Aggregator which takes an {@link AggregationProfile}, and uses the data to aggregate the values into trees of * Aggregator which takes an {@link Entry} and aggregates the descendants into a {@link Tree}.
* {@link Node}s aggregated by FQMN.
*/ */
public class CalledTreeAggregator implements Aggregator<Entry<String>, String, Node<String>> public class DescendantTreeAggregator implements Aggregator<Entry<String>, String, Node<String>>
{ {
// Aggregator Implementation // Aggregator Implementation


/** /**
* Iterate over the top-level {@link LeanNode}s containing the thread-level information, and recursively traverse
* the descendants, aggregating them on each level by FQMN.
*
* @see Aggregator#aggregate(Object, LeanNode) * @see Aggregator#aggregate(Object, LeanNode)
*/ */
@Override @Override
Expand Down
Expand Up @@ -3,9 +3,9 @@
import java.util.function.Function; import java.util.function.Function;


import com.insightfullogic.honest_profiler.core.aggregation.AggregationProfile; import com.insightfullogic.honest_profiler.core.aggregation.AggregationProfile;
import com.insightfullogic.honest_profiler.core.aggregation.aggregator.CalledTreeAggregator; import com.insightfullogic.honest_profiler.core.aggregation.aggregator.DescendantTreeAggregator;
import com.insightfullogic.honest_profiler.core.aggregation.aggregator.CallingTreeAggregator; import com.insightfullogic.honest_profiler.core.aggregation.aggregator.AncestorTreeAggregator;
import com.insightfullogic.honest_profiler.core.aggregation.aggregator.NodeDescendantAggregator; import com.insightfullogic.honest_profiler.core.aggregation.aggregator.DescendantFlatAggregator;
import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Entry; import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Entry;
import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Flat; import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Flat;
import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node; import com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node;
Expand All @@ -16,10 +16,10 @@


public class BindUtil public class BindUtil
{ {
private static final NodeDescendantAggregator DESCENDANT_AGGREGATOR = new NodeDescendantAggregator(); private static final DescendantFlatAggregator DESCENDANT_AGGREGATOR = new DescendantFlatAggregator();


private static final CallingTreeAggregator CALLING_AGGREGATOR = new CallingTreeAggregator(); private static final AncestorTreeAggregator CALLING_AGGREGATOR = new AncestorTreeAggregator();
private static final CalledTreeAggregator CALLED_AGGREGATOR = new CalledTreeAggregator(); private static final DescendantTreeAggregator CALLED_AGGREGATOR = new DescendantTreeAggregator();


public static final Function<Object, Flat<String>> FLAT_EXTRACTOR = o -> o == null ? null public static final Function<Object, Flat<String>> FLAT_EXTRACTOR = o -> o == null ? null
: ((AggregationProfile)o).getFlat(); : ((AggregationProfile)o).getFlat();
Expand Down

0 comments on commit 55e8b5e

Please sign in to comment.