public async Task ExecuteAsync()

in Core/src/Impl/Commands/TimeReportingCommand.cs [30:50]


    public async Task<int> ExecuteAsync()
    {
      Stopwatch sw = Stopwatch.StartNew();
      try
      {
        return await myCommand.ExecuteAsync();
      }
      finally
      {
        ExecutionTime = sw.Elapsed;
        Executed = true;

        if (myLogger != null)
        {
          string logText = $"[{DateTime.Now:s}] '{myCommand.GetType().Name}' executed in {ExecutionTime}.";
          if (myCommand is IStatsReportingCommand sRepCmd && sRepCmd.SubOperationsCount > 0)
            logText += $" Sub-operations count: {sRepCmd.SubOperationsCount}, RPS: {sRepCmd.SubOperationsCount / ExecutionTime.TotalSeconds}.";
          myLogger.Info(logText);
        }
      }
    }