Interface JoinStatsProvider
public interface JoinStatsProvider
Collects and supplies statistics about triple pattern evaluations.
-
Method Summary
Modifier and TypeMethodDescriptiondoubledefault longgetCalls(PatternKey key) Returns the number of observed calls for the given key, or a negative value when unavailable.default longgetFilterObservationCount(PatternKey key, String filterKey) Returns the number of observed outcomes for a specific filter condition and pattern key, or a negative value when unavailable.default doublegetFilterPassRatio(PatternKey key, String filterKey) Returns the observed pass ratio for a specific filter condition and pattern key, or a negative value when unavailable.default longgetFilterTemplateObservationCount(PatternKey key, String filterTemplateKey) Returns the number of observed outcomes for a generalized filter template and pattern key, or a negative value when unavailable.default doublegetFilterTemplatePassRatio(PatternKey key, String filterTemplateKey) Returns the observed pass ratio for a generalized filter template and pattern key, or a negative value when unavailable.default doublegetMaxResults(PatternKey key) Returns the maximum observed result count per call for the given key.default longReturns the number of observed outcomes for all filters seen on a pattern key, or a negative value when unavailable.default doubleReturns the observed aggregate pass ratio for all filters seen on a pattern key, or a negative value when unavailable.longdefault doublegetUncertainty(PatternKey key) Returns an uncertainty score in [0,1] where 1 means highest uncertainty.booleanhasStats(PatternKey key) voidrecordCall(PatternKey key) default voidrecordFilterOutcome(PatternKey key, String filterKey, long passedCount, long filteredCount) Records observed filter outcomes for a statement-pattern key and condition key.voidrecordResults(PatternKey key, long resultCount) default voidrecordStatementsAdded(long statementCount) Records that statements have been added to the store.voidreset()voidseedIfAbsent(PatternKey key, double defaultCardinality, long priorCalls) Seeds statistics for the given key.
-
Method Details
-
reset
void reset() -
recordCall
-
recordResults
-
recordFilterOutcome
default void recordFilterOutcome(PatternKey key, String filterKey, long passedCount, long filteredCount) Records observed filter outcomes for a statement-pattern key and condition key.- Parameters:
key- statement-pattern key associated with the filterfilterKey- normalized filter-condition keypassedCount- number of rows accepted by the filterfilteredCount- number of rows rejected by the filter
-
getFilterPassRatio
Returns the observed pass ratio for a specific filter condition and pattern key, or a negative value when unavailable. -
getFilterTemplatePassRatio
Returns the observed pass ratio for a generalized filter template and pattern key, or a negative value when unavailable. -
getPatternPassRatio
Returns the observed aggregate pass ratio for all filters seen on a pattern key, or a negative value when unavailable. -
getFilterObservationCount
Returns the number of observed outcomes for a specific filter condition and pattern key, or a negative value when unavailable. -
getFilterTemplateObservationCount
Returns the number of observed outcomes for a generalized filter template and pattern key, or a negative value when unavailable. -
getPatternObservationCount
Returns the number of observed outcomes for all filters seen on a pattern key, or a negative value when unavailable. -
seedIfAbsent
Seeds statistics for the given key. Implementations may also invalidate or refresh existing entries if the supplied default cardinality has drifted significantly from the stored baseline. -
getAverageResults
-
getMaxResults
Returns the maximum observed result count per call for the given key. Defaults to the average result count when not supported by an implementation. -
hasStats
-
getCalls
Returns the number of observed calls for the given key, or a negative value when unavailable. -
getUncertainty
Returns an uncertainty score in [0,1] where 1 means highest uncertainty. -
getTotalCalls
long getTotalCalls() -
recordStatementsAdded
default void recordStatementsAdded(long statementCount) Records that statements have been added to the store. Implementations may use this to invalidate statistics when a write threshold is exceeded in a time window.
-