Skip to content

Commit

Permalink
fix(minor): round to 0.00 sql command size
Browse files Browse the repository at this point in the history
  • Loading branch information
Basim108 committed Mar 23, 2021
1 parent 6090226 commit efa3ab9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public async Task<BulkOperationResult<TEntity>> ExecuteOperationAsync<TEntity>(
result?.Operated.AddRange(elements);
if (sw != null) {
var (size, suffix) = totalSqlSize.PrettifySize();
_logger.LogInformation($"{operation}ed {elements.Count} {entityProfile.EntityType.Name} elements, {totalSqlCommandCount} sql commands ({size}{suffix}) in total {sw.ElapsedMilliseconds / 1000f:0.000} s");
_logger.LogInformation($"{operation}ed {elements.Count} {entityProfile.EntityType.Name} elements, {totalSqlCommandCount} sql commands ({size:0.00}{suffix}) in total {sw.ElapsedMilliseconds / 1000f:0.000} s");
}
}
catch (Exception ex) {
Expand Down Expand Up @@ -237,7 +237,7 @@ await ProcessFailureAsync(operation,
await transaction.CommitAsync(cancellationToken);
if (sw != null) {
var (size, suffix) = totalSqlSize.PrettifySize();
_logger.LogInformation($"{operation}ed {elements.Count} {entityProfile.EntityType.Name} elements in {iterations} steps, {totalSqlCommandCount} sql commands ({size}{suffix}) in total {sw.ElapsedMilliseconds / 1000f:0.000} s");
_logger.LogInformation($"{operation}ed {elements.Count} {entityProfile.EntityType.Name} elements in {iterations} steps, {totalSqlCommandCount} sql commands ({size:0.00}{suffix}) in total {sw.ElapsedMilliseconds / 1000f:0.000} s");
}
}
return result;
Expand Down

0 comments on commit efa3ab9

Please sign in to comment.