pickers

Registry entry pickers for no-reset benchmarks.

class pysatl_cpd.benchmark.online.noreset.tooling.pickers.OnlineNoResetEntryAlgorithmPicker(*args, **kwargs)[source]

Bases: BenchmarkEntriesPicker

Picks registry keys that match detector description produced by NoResetOnlineDetector(entry.algorithm).

pick(entries, benchmark_entry)[source]

Pick registry keys matching a benchmark entry’s detector description.

Parameters:
Returns:

Keys whose detector description matches and whose provider type is bisegment.

Return type:

Sequence[SingleRunDescription]

class pysatl_cpd.benchmark.online.noreset.tooling.pickers.OnlineNoResetBisegmentByTransitionPicker(transition)[source]

Bases: BenchmarkEntriesPicker

Like OnlineNoResetEntryAlgorithmPicker, but keeps only bisegment runs whose annotation matches the given transition.

Use when the registry may contain other transitions (e.g. after a full benchmark) but metrics must refer to a single transition only.

Parameters:

transition (TransitionDescriptor) – Transition to filter bisegment runs by.

__init__(transition)[source]
Parameters:

transition (TransitionDescriptor)

Return type:

None

pick(entries, benchmark_entry)[source]

Pick keys matching both the algorithm and the configured transition.

Parameters:
Returns:

Keys whose detector description matches and whose provider annotation has the configured transition.

Return type:

Sequence[SingleRunDescription]

class pysatl_cpd.benchmark.online.noreset.tooling.pickers.OnlineNoResetNoChangeByStatePicker(state)[source]

Bases: BenchmarkEntriesPicker

Pick no-change registry keys for a benchmark entry and state.

Parameters:

state (StateDescriptor) – State descriptor to filter by.

__init__(state)[source]
Parameters:

state (StateDescriptor)

Return type:

None

pick(entries, benchmark_entry)[source]

Pick keys matching the entry’s detector and configured no-change state.

Parameters:
Return type:

Sequence[SingleRunDescription]