async def benchmark_operation_execution(
        self,
        inputs: Optional[Dict[str, Any]] = None,
        iterations: int = 1,
        warmup: bool = False,
    ) -> List[OperationExecutionInfo]:
        """
        Measures the execution time of individual operations in the model.

        This method loads the model, runs predictions, and retrieves the execution time
        of each operation within the model.

        Parameters
        ----------
        inputs : Optional[Dict[str, Any]]
            The input data for the model prediction. If None, random input data will be generated.

        iterations: int
            The number of prediction iterations to run. Defaults to 1.

        warmup: bool
            Whether to perform a warmup iteration. Defaults to False.

        Returns
        -------
        List[OperationExecutionInfo]
            A list of OperationExecutionInfo objects, each containing
            details about an operation's execution, sorted by execution time in descending order.

        Notes
        -----
        - The returned list is sorted by execution time, with the most time-consuming operations first.
        - Execution times are estimated based on the overall prediction time and the model's compute plan.
        """

        predict_measurement = await self.benchmark_predict(
            inputs=inputs,
            iterations=iterations,
            warmup=warmup,
        )

        compute_plan = await self._loaded_model.retrieve_compute_plan()

        path_to_op_spec_map = {
            path: spec for spec, path in map_model_spec_to_path(model_spec=self.model_spec)
        }

        path_to_op_structure_map = {
            path: structure
            for structure, path in map_model_structure_to_path(
                model_structure=compute_plan.model_structure
            )
        }

        result = []
        for path, op_structure in path_to_op_structure_map.items():
            op_spec = path_to_op_spec_map.get(path, None)
            if op_spec is None:
                continue

            compute_device_usage = compute_plan.get_compute_device_usage_for_mlprogram_operation(
                op_structure
            )

            estimated_cost = compute_plan.get_estimated_cost_for_mlprogram_operation(op_structure)

            durations = (
                [sample * estimated_cost.weight for sample in predict_measurement.samples]
                if estimated_cost is not None
                else None
            )

            measurement = MLModelBenchmarker.Measurement.from_samples(
                samples=durations if durations is not None else []
            )

            execution_info = MLModelBenchmarker.OperationExecutionInfo(
                spec=op_spec,
                path=path,
                compute_device_usage=compute_device_usage,
                measurement=measurement,
            )

            result.append(execution_info)

        return sorted(result, key=lambda value: value.measurement.sort_key, reverse=True)

        Measures the execution time of individual operations in the model.

        This method loads the model, runs predictions, and retrieves the execution time
        of each operation within the model.

        Parameters
        ----------
        inputs : Optional[Dict[str, Any]]
            The input data for the model prediction. If None, random input data will be generated.

        iterations: int
            The number of prediction iterations to run. Defaults to 1.

        warmup: bool
            Whether to perform a warmup iteration. Defaults to False.

        Returns
        -------
        List[OperationExecutionInfo]
            A list of OperationExecutionInfo objects, each containing
            details about an operation's execution, sorted by execution time in descending order.

        Notes
        -----
        - The returned list is sorted by execution time, with the most time-consuming operations first.
        - Execution times are estimated based on the overall prediction time and the model's compute plan.
        
coremltools/models/ml_program/experimental/perf_utils.py