Exemplo n.º 1
0
        private static Options CreateOptions(AppEventSource source)
        {
            var result = new Options
            {
                InitialPartitionSize  = 50 * 8,
                WriteCounter          = new("WAL.Writes", source),
                ReadCounter           = new("WAL.Reads", source),
                CommitCounter         = new("WAL.Commits", source),
                CompactionCounter     = new("WAL.Compaction", source),
                LockContentionCounter = new("WAL.LockContention", source),
                LockDurationCounter   = new("WAL.LockDuration", source),
            };

            result.WriteCounter.DisplayUnits                  =
                result.ReadCounter.DisplayUnits               =
                    result.CommitCounter.DisplayUnits         =
                        result.CompactionCounter.DisplayUnits = "entries";

            result.LockDurationCounter.DisplayUnits = "milliseconds";
            result.LockDurationCounter.DisplayName  = "WAL Lock Duration";

            result.LockContentionCounter.DisplayName = "Lock Contention";

            result.WriteCounter.DisplayName      = "Number of written entries";
            result.ReadCounter.DisplayName       = "Number of retrieved entries";
            result.CommitCounter.DisplayName     = "Number of committed entries";
            result.CompactionCounter.DisplayName = "Number of squashed entries";

            return(result);
        }
Exemplo n.º 2
0
 public SimplePersistentState(IConfiguration configuration, AppEventSource source)
     : this(configuration[LogLocation], source)
 {
 }
Exemplo n.º 3
0
 public SimplePersistentState(string path, AppEventSource source)
     : base(path, 50, CreateOptions(source))
 {
 }