forked from ddrilling/AsbCloudServer
Decrease TelemetryDataCache size.
This commit is contained in:
parent
289d1831b4
commit
8094c8b1b8
@ -61,7 +61,7 @@ namespace AsbCloudDb.Model
|
||||
public DbSet<WITS.Record60> Record60 => Set<WITS.Record60>();
|
||||
public DbSet<WITS.Record61> Record61 => Set<WITS.Record61>();
|
||||
|
||||
public int ReferenceCount { get; private set; }
|
||||
public static int ReferenceCount { get; private set; }
|
||||
|
||||
public AsbCloudDbContext() : base()
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
public class TelemetryDataCache<TDto>
|
||||
where TDto : AsbCloudApp.Data.ITelemetryData
|
||||
{
|
||||
private const int activeWellCapacity = 24 * 60 * 60;
|
||||
private const int activeWellCapacity = 12 * 60 * 60;
|
||||
private const int doneWellCapacity = 65 * 60;
|
||||
|
||||
private readonly ConcurrentDictionary<int, CyclycArray<TDto>> caches;
|
||||
|
@ -43,7 +43,7 @@ namespace AsbCloudInfrastructure
|
||||
var workAction = (string _, IServiceProvider _, CancellationToken _) => {
|
||||
var bytes = GC.GetTotalMemory(false);
|
||||
var bytesString = FromatBytes(bytes);
|
||||
System.Diagnostics.Trace.TraceInformation($"Total memory allocated is {bytesString} bytes");
|
||||
System.Diagnostics.Trace.TraceInformation($"Total memory allocated is {bytesString} bytes. DbContext count is:{AsbCloudDb.Model.AsbCloudDbContext.ReferenceCount}");
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
var workPeriod = TimeSpan.FromMinutes(1);
|
||||
|
Loading…
Reference in New Issue
Block a user