This commit is contained in:
2020-05-25 13:17:28 +00:00
parent 5610ba3944
commit db312efd7d
5 changed files with 50 additions and 13 deletions

View File

@@ -245,7 +245,7 @@ namespace AyaNova.Util
//METRICS TABLES
//CPU
await ExecQueryAsync("CREATE TABLE ametriccpu (t timestamp not null, v double precision not null default 0)");
await ExecQueryAsync("CREATE TABLE ametricmm (t timestamp not null, v real not null default 0)");
//SEARCH TABLES

View File

@@ -91,10 +91,11 @@ namespace AyaNova.Util
//TEST METRICS SIZE
using (var cct = ServiceProviderProvider.DBContext)
{
Faker Fake = new Faker();
var TestCount = 365 * 24 * 60;//525600 minutes in a year
for (int i = 0; i < TestCount; i++)
{
cct.MetricCPU.Add(new MetricCPU() { v = 33.33333 });
cct.MetricMM.Add(new MetricMM() { v = Fake.Finance.Random.Float() });
}
cct.SaveChanges();