Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/host-ci-main-postgres-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: dotnet build --no-restore --configuration Release --warnaserror --property:DefineConstants="CI_GITHUB%3BCI_LINUX%3BRUN_REDIS_TESTS%3BRUN_POSTGRES_TESTS%3BRUN_S3_TESTS" ./odin-core.sln

- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --configuration Release --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer.PeerAppNotificationsWebSocket.PeerAppNotificationTests.CanGetMultiplePeerAppNotificationsAcrossAGroupOfIdentitiesWhenUsingACentralIdentity" --configuration Release --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer" --configuration Debug --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Core.Storage.Tests.ObjectStorage" --configuration Release --verbosity normal
run: dotnet test --no-build --filter "Odin.Core.Storage.Tests.Database.Identity.Abstractions.DriveMainIndexPerformanceTests.PerformanceTest03B" --configuration Release --verbosity normal
4 changes: 2 additions & 2 deletions .github/workflows/host-ci-main-sqlite-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: dotnet build --no-restore --configuration Debug --warnaserror --property:DefineConstants="CI_GITHUB%3BCI_WINDOWS" ./odin-core.sln

- name: Test
run: dotnet test --no-build --configuration Debug --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --configuration Debug --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer.PeerAppNotificationsWebSocket.PeerAppNotificationTests.CanGetMultiplePeerAppNotificationsAcrossAGroupOfIdentitiesWhenUsingACentralIdentity" --configuration Debug --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer" --configuration Debug --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Core.Storage.Tests.ObjectStorage" --configuration Debug --verbosity normal
run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Core.Storage.Tests.Database.Identity.Abstractions.DriveMainIndexPerformanceTests.PerformanceTest03B" --configuration Debug --verbosity normal
4 changes: 2 additions & 2 deletions .github/workflows/host-ci-main-sqlite-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: dotnet build --no-restore --configuration Release --warnaserror --property:DefineConstants="CI_GITHUB%3BCI_LINUX%3BRUN_REDIS_TESTS%3BRUN_S3_TESTS" ./odin-core.sln

- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --configuration Release --verbosity normal ./odin-core.sln
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer.PeerAppNotificationsWebSocket.PeerAppNotificationTests.CanGetMultiplePeerAppNotificationsAcrossAGroupOfIdentitiesWhenUsingACentralIdentity" --configuration Release --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Hosting.Tests._Universal.Peer" --configuration Debug --verbosity normal ./tests/apps/Odin.Hosting.Tests/Odin.Hosting.Tests.csproj
# run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Core.Storage.Tests.ObjectStorage" --configuration Release --verbosity normal
run: dotnet test --no-build --filter "FullyQualifiedName=Odin.Core.Storage.Tests.Database.Identity.Abstractions.DriveMainIndexPerformanceTests.PerformanceTest03B" --configuration Release --verbosity normal
6 changes: 6 additions & 0 deletions src/core/Odin.Core.Storage/Factory/ScopedConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,13 @@ public async Task<ITransactionWrapper> BeginStackedTransactionAsync(
try
{
instance.LogTrace("Beginning transaction");

var start = Stopwatch.StartNew();
instance._transaction = await instance._connection.BeginTransactionAsync(isolationLevel, cancellationToken);
if (start.Elapsed > TimeSpan.FromSeconds(1))
{
instance._logger.LogWarning("BeginTransactionAsync - took {time}", start.Elapsed);
}
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
using System.Diagnostics;
using System.Threading.Tasks;
using Autofac;
using Microsoft.Extensions.Logging;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Odin.Core.Storage.Database;
using Odin.Core.Storage.Database.Identity.Abstractions;
using Odin.Core.Storage.Database.Identity.Connection;
using Odin.Core.Storage.Database.Identity.Table;
using Odin.Core.Storage.Factory;
using Odin.Core.Time;
Expand Down Expand Up @@ -360,7 +362,8 @@ public async Task PerformanceTest03B(DatabaseType databaseType) // Just making s
{
await RegisterServicesAsync(databaseType);

// var logger = Services.Resolve<ILogger<ScopedIdentityConnectionFactory>>();
var logger = Services.Resolve<ILogger<ScopedIdentityConnectionFactory>>();
logger.LogDebug("PerformanceTest03B: Starting multi-threaded test with a connection per thread");

Task[] tasks = new Task[MAXTHREADS];
var driveId = Guid.NewGuid();
Expand Down Expand Up @@ -397,6 +400,8 @@ public async Task PerformanceTest03B(DatabaseType databaseType) // Just making s
throw;
}

logger.LogDebug("PerformanceTest03B: Stopping multi-threaded test with a connection per thread");

sw.Stop();

Console.WriteLine($"Threads : {MAXTHREADS}");
Expand Down