427 {
428 if (!operation)
429 return std::nullopt;
430
432
433 try {
434 IO<InputType> input_wrapper(input);
435
436 ExecutionContext ctx;
438
439 auto start = std::chrono::steady_clock::now();
440
441 auto result = operation->apply_operation_internal(input_wrapper, ctx);
442
444 auto end = std::chrono::steady_clock::now();
445 auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
447 }
448
449 return result;
450
451 } catch (const std::exception& e) {
454 return std::nullopt;
455 }
456 }
void update_execution_time(double ms)
Update execution time statistics.
std::atomic< size_t > m_failed_executions
std::atomic< size_t > m_total_executions
void configure_execution_context(ExecutionContext &ctx, const std::type_index &op_type)
Configure execution context based on operation type and policy.
void handle_execution_error(const std::exception &e, const std::type_index &op_type)
Handle execution errors.