Commit
ac69ae270aed21cd8525902c4d59eb260e095652
by Matthew Khouzamtiming.core: Refactor statistics analysis to add generic segment type
This commit refactors the existing GenericSegmentStatisticsAnalysis and
SegmentStoreStatisticsDataProviderFactory so that they can be extended
to make new statistics analysis with different grouping logic:
[1] The GenericSegmentStatisticsAnalysis is now a public class, and
provides a default implementation for the getSegmentType method. By
default, this method groups the data of a statistics analysis by segment
name. The class can be extended to overwrite the default aggregating
logic.
[2] The SegmentStoreStatisticsDataProviderFactory is split into 2
classes: The AbstractSegmentStoreStatisticsDataProviderFactory and
SegmentNameSegmentStoreStatisticsDataProviderFactory. The
AbstractSegmentStoreStatisticsDataProviderFactory provides the common
logic to generate a data provider for segment store statistics analysis.
The SegmentNameSegmentStoreStatisticsDataProviderFactory extends the
prior class, and binds the data provider to the
GenericSegmentStatisticsAnalysis, which groups the data using the
segment name. New data provider factories can extends the abstract class
to use different grouping logic for statistics analysis by binding
itself to different implementations of GenericSegmentStatisticsAnalysis.
Change-Id: I895efe32384026ebfd8668bdb250e02900281c78
Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204373
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>