490 {
491 if (!operation)
492 return std::nullopt;
493
495
496 try {
497 ExecutionContext ctx;
499
500 auto start = std::chrono::steady_clock::now();
501
502 auto result = operation->apply_operation_internal(input, ctx);
503
505 auto end = std::chrono::steady_clock::now();
506 auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
508 }
509
510 return result;
511
512 } catch (const std::exception& e) {
515 return std::nullopt;
516 }
517 }
std::optional< double > duration
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.