Browse Source

Better naming.

pull/883/head
Sebastian 4 years ago
parent
commit
60427f3ae1
  1. 6
      backend/src/Squidex.Infrastructure/Dump/Dumper.cs
  2. 4
      backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs
  3. 18
      backend/src/Squidex/appsettings.json

6
backend/src/Squidex.Infrastructure/Dump/Dumper.cs

@ -32,7 +32,7 @@ namespace Squidex.Infrastructure.Dump
public Task InitializeAsync(
CancellationToken ct)
{
if (options.DumpLimit > 0 || options.GCDumpLimit > 0)
if (options.DumTrigger > 0 || options.GCDumpTrigger > 0)
{
timer = new Timer(CollectDump);
timer.Change(TimeSpan.Zero, TimeSpan.FromSeconds(5));
@ -70,12 +70,12 @@ namespace Squidex.Infrastructure.Dump
{
var usage = GC.GetTotalMemory(false) / (1024 * 1024);
if (options.DumpLimit > 0 && usage > options.DumpLimit && scheduledDumpTask == null)
if (options.DumTrigger > 0 && usage > options.DumTrigger && scheduledDumpTask == null)
{
scheduledDumpTask = CreateDumpAsync();
}
if (options.GCDumpLimit > 0 && usage > options.GCDumpLimit && scheduledGcDumpTask == null)
if (options.GCDumpTrigger > 0 && usage > options.GCDumpTrigger && scheduledGcDumpTask == null)
{
scheduledGcDumpTask = CreateGCDumpAsync();
}

4
backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs

@ -13,8 +13,8 @@ namespace Squidex.Infrastructure.Dump
public string? DumpTool { get; set; }
public int GCDumpLimit { get; set; }
public int GCDumpTrigger { get; set; }
public int DumpLimit { get; set; }
public int DumTrigger { get; set; }
}
}

18
backend/src/Squidex/appsettings.json

@ -319,6 +319,24 @@
}
},
"diagnostics": {
// The path to the dotnet-dump tool binary.
//
// REMARKS: Will be set automatically in the official Docker image.
"dumpTool": "",
// When more memory is allocated that the defined value (in MB) a dump will be created once automatically and written to the asset store.
"dumpTrigger": 0,
// The path to the dotnet-gcdump tool binary.
//
// REMARKS: Will be set automatically in the official Docker image.
"gcdumpTool": "",
// When more memory is allocated than the defined value (in MB) a gcdump will be created once automatically and written to the asset store.
"gcumpTrigger": 0
},
"assetStore": {
// Define the type of the read store.
//

Loading…
Cancel
Save