public RunMeta(string worldname, DateTime timestamp, MetaFeatures feature, T value) { Worldname = worldname; Timestamp = timestamp; Feature = feature; Value = value; }
public IEnumerable <RunMeta <int> > Get(MetaFeatures feature, DateTime inclusiveStart, DateTime exclusiveEnd) { switch (feature) { case MetaFeatures.BlazeRod: { return(_blazeCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.Fortress: { return(_fortressCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.Nether: { return(_netherCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.Search: { return(_searchCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.Spawn: { return(_spawnCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.Stronghold: { return(_strongholdCollection.Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } case MetaFeatures.TheEnd: { return(_endCollection .Find(x => x.Timestamp >= inclusiveStart && x.Timestamp < exclusiveEnd)); } default: { throw new Exception($"Feature {feature} now allowed."); } } }
public bool Exists(string worldname, MetaFeatures feature) { switch (feature) { case MetaFeatures.BlazeRod: { return(_blazeCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.Fortress: { return(_fortressCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.Nether: { return(_netherCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.Search: { return(_searchCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.Spawn: { return(_spawnCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.Stronghold: { return(_strongholdCollection.Exists(x => x.Worldname == worldname)); } case MetaFeatures.TheEnd: { return(_endCollection.Exists(x => x.Worldname == worldname)); } default: { throw new Exception($"Feature {feature} now allowed."); } } }
public IEnumerable <RunMeta <int> > Get(MetaFeatures feature) { switch (feature) { case MetaFeatures.BlazeRod: { return(_blazeCollection.FindAll()); } case MetaFeatures.Fortress: { return(_fortressCollection.FindAll()); } case MetaFeatures.Nether: { return(_netherCollection.FindAll()); } case MetaFeatures.Search: { return(_searchCollection.FindAll()); } case MetaFeatures.Spawn: { return(_spawnCollection.FindAll()); } case MetaFeatures.Stronghold: { return(_strongholdCollection.FindAll()); } case MetaFeatures.TheEnd: { return(_endCollection.FindAll()); } default: { throw new Exception($"Feature {feature} now allowed."); } } }
private void writeSection(TimingAnalytics timings, RunImport run, Sections section, MetaFeatures feature) { var timing = timings.Events.FirstOrDefault(x => x.Section == section); if (timing != null) { var meta = new RunMeta <int>(run.Worldname, timing.Start, feature, (int)timing.Time.TotalMilliseconds); _writer.Upsert(meta); } }
public TimingStats(MetaFeatures key) => Section = key.ToString();
public IEnumerable <RunMeta <int> > Get(MetaFeatures feature, DateTime inclusiveStart, DateTime exclusiveEnd) { var result = _component.Get(feature, inclusiveStart, exclusiveEnd); return(sanitize(result)); }
public IEnumerable <RunMeta <int> > Get(MetaFeatures feature) { var result = _component.Get(feature); return(sanitize(result)); }