Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ramon Smits <ramon.smits@gmail.com>
  • Loading branch information
andreasohlund and ramonsmits authored Jan 31, 2025
1 parent 591e93b commit bfcf93f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ServiceControl.Audit/Auditing/AuditPersister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ public async Task<IReadOnlyList<MessageContext>> Persist(IReadOnlyList<MessageCo

var auditSw = Stopwatch.StartNew();
await unitOfWork.RecordProcessedMessage(processedMessage, context.Body);
auditSw.Stop();

auditBulkInsertDurationMeter.Record(auditSw.ElapsedMilliseconds);

ingestedAuditMeter.Add(1);
Expand All @@ -90,8 +88,6 @@ public async Task<IReadOnlyList<MessageContext>> Persist(IReadOnlyList<MessageCo

var sagaSw = Stopwatch.StartNew();
await unitOfWork.RecordSagaSnapshot(sagaSnapshot);
sagaSw.Stop();

sagaAuditBulkInsertDurationMeter.Record(sagaSw.ElapsedMilliseconds);

ingestedSagaAuditMeter.Add(1);
Expand Down Expand Up @@ -134,8 +130,7 @@ public async Task<IReadOnlyList<MessageContext>> Persist(IReadOnlyList<MessageCo
// this can throw even though dispose is never supposed to throw
var commitSw = Stopwatch.StartNew();
await unitOfWork.DisposeAsync();
commitSw.Stop();
bulkInsertCommitDurationMeter.Record(commitSw.ElapsedMilliseconds);
bulkInsertCommitDurationMeter.Record(commitSw.ElapsedMilliseconds);

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PrimaryRavenPersistence

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PrimaryRavenPersistence

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-RabbitMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-RabbitMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PrimaryRavenAcceptance

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PrimaryRavenAcceptance

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-Default

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-Default

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-SQS

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-SQS

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-AzureStorageQueues

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-AzureStorageQueues

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-AzureServiceBus

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-AzureServiceBus

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PostgreSQL

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-PostgreSQL

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-SqlServer

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Linux-SqlServer

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-SqlServer

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-SqlServer

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-MSMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-MSMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PrimaryRavenPersistence

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PrimaryRavenPersistence

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-Default

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-Default

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-SQS

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-SQS

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PrimaryRavenAcceptance

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PrimaryRavenAcceptance

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PostgreSQL

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-PostgreSQL

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-RabbitMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-RabbitMQ

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / windows-installers / build

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / windows-installers / build

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-AzureServiceBus

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-AzureServiceBus

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-AzureStorageQueues

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 133 in src/ServiceControl.Audit/Auditing/AuditPersister.cs

View workflow job for this annotation

GitHub Actions / Windows-AzureStorageQueues

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
}
catch (Exception e)
{
Expand Down

0 comments on commit bfcf93f

Please sign in to comment.