Beispiel #1
0
 private static void WriteStatus(LogAggregate agg)
 {
     Console.WriteLine($"Status Update - hits = {agg.RollingTotal} at {agg.Occurance}");
     foreach (var kvp in agg.Counts.OrderByDescending(k => k.Value).ThenBy(k => k.Key.Length))
     {
         if (kvp.Value > 0)
         {
             Console.WriteLine($"{kvp.Key} : {kvp.Value}");
         }
     }
     Console.WriteLine("--------------------------------------------------");
 }
 protected void OnAlertCancelled(LogAggregate agg) => AlertCancelled?.Invoke(this, agg);
 protected void OnAlertTriggered(LogAggregate agg) => AlertTriggered?.Invoke(this, agg);
 protected void OnAggregateProcessed(LogAggregate agg) => AggregateProcessed?.Invoke(this, agg);
Beispiel #5
0
 private static void WriteAlertCancelled(LogAggregate agg)
 {
     Console.WriteLine($"Traffic back to normal - hits = {agg.RollingTotal} at {agg.Occurance}");
 }
Beispiel #6
0
 private static void WriteAlertTriggered(LogAggregate agg)
 {
     Console.WriteLine($"High traffic generated an alert - hits = {agg.RollingTotal}, triggered at {agg.Occurance}");
 }