rysavy-ondrej / ethanol

An experimental environment for context-based flow artifact analysis.
1 stars 0 forks source link

Improve performance measurement and counters #38

Closed rysavy-ondrej closed 8 months ago

rysavy-ondrej commented 9 months ago

Implement a comprehensive set of counters to deal with various performance characteristics of the builder pipeline.

Provide Web-based performance monitor

rysavy-ondrej commented 9 months ago

Each component of the processing pipeline can support counters. The design pattern is that the class defines Counters class that is accepted as an optional constructor parameter. If it is provided, it is used by the component to provide actual counters. For instance:

class Component
{
  Counters? _counters = null;
  ILogger? _logger = null;
  public Component( Counters counters, ILogger logger)
  {
    _counters = counters;
    _logger = logger;
  }

  int Process (int value)
  {
     if (_counters) _counters.ProcessedItems++;
     return value * value;
  }

  public class Counters
  {
     int ProcessedItems;
  }
}
rysavy-ondrej commented 8 months ago

See more at:

https://learn.microsoft.com/en-us/dotnet/core/diagnostics/

rysavy-ondrej commented 8 months ago

Performance counter implemented using dotnet-counters.

Todo: enable remote monitoring.

rysavy-ondrej commented 8 months ago

dotnet-counter is acceptable solution for performance monitoring,