Skip to content

ExecutionSpeedAnalysis

QuantConnect.Lean.Engine.Results.Analysis.Analyses.ExecutionSpeedAnalysis

Bases: BaseResultsAnalysis

Detects slow execution by parsing the last log line. Benchmark speeds: https://www.quantconnect.com/performance

issue

issue: str

Gets the description of the slow execution issue.

weight

weight: int

Gets the severity weight for the execution speed analysis.

run

run(
    parameters: ResultsAnalysisRunParameters,
) -> Sequence[Analysis]
run(logs: Sequence[str]) -> Sequence[Analysis]

Signature descriptions:

  • Runs the execution speed analysis against the provided backtest parameters.

  • Parses the backtest logs to determine execution speed and flags backtests that ran slowly.

Parameters:

Name Type Description Default
logs Optional[Sequence[str]]

The full list of log lines produced by the backtest.

None

Returns:

Type Description
Sequence[Analysis]

Analysis results flagging slow execution when below 40k data points per second and runtime is at least 10 seconds.

single_response

single_response(
    sample: Any, solutions: Sequence[str] = None
) -> Sequence[Analysis]
single_response(
    sample: Any,
    count: Optional[int],
    solutions: Sequence[str] = None,
) -> Sequence[Analysis]

Wraps a single QuantConnect.Analysis in a one-element read-only list.

create_aggregated_response

create_aggregated_response(
    responses: List[Analysis],
) -> Sequence[Analysis]

Filters responses to those with solutions, prefixes the class name, and returns a flat list.

This codeEntityType is protected.

format_code

format_code(code: str, language: Language) -> str

Formats the specified code string according to the conventions of the given programming language.

This codeEntityType is protected.