Volian.Base.Library & Baseline

This commit is contained in:
2026-08-11 07:33:32 -04:00
parent 6d7d127b63
commit b1427f4997
26 changed files with 389 additions and 1239 deletions
+30 -61
View File
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Volian.Base.Library
{
@@ -12,57 +10,40 @@ namespace Volian.Base.Library
/// </summary>
public class VolianTimer
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
static List<VolianTimer> _Timers = new List<VolianTimer>();
/// <summary>
/// User defined name - should be as specific as possible
/// Include Method Name, File Name and Line Number
/// </summary>
private string _Name;
public string Name
{
get { return _Name; }
set { _Name = value; }
}
/// <summary>
/// Set on open
/// </summary>
private DateTime _Start;
public DateTime Start
{
get { return _Start; }
set { _Start = value; }
}
/// <summary>
/// Calculate on Close
/// </summary>
private long _Ticks;
public long Ticks
{
get { return _Ticks; }
set { _Ticks = value; }
}
/// <summary>
/// Number of times open/close has been run
/// </summary>
private int _Count;
public int Count
{
get { return _Count; }
set { _Count = value; }
}
/// <summary>
/// Constructor
/// </summary>
public VolianTimer()
#pragma warning disable S6669
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#pragma warning restore S6669
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
static List<VolianTimer> _Timers = new List<VolianTimer>();
public string Name { get; set; }
public DateTime Start { get; set; }
public long Ticks { get; set; }
public int Count { get; set; }
/// <summary>
/// Constructor
/// </summary>
public VolianTimer()
{
Count = 0;
Ticks = 0;
}
/// <summary>
/// Command Line Parameter /Timing turns timing on
/// </summary>
private static bool? _TimingsOn = null;
/// <summary>
/// Constructor with Module and line number
/// </summary>
/// <param name="module">Method Name, File Name</param>
/// <param name="line">Code Line Number</param>
public VolianTimer(string module, int line)
{
Count = 0;
Ticks = 0;
Name = string.Format("{0}:{1}", module, line);
if (TimingsOn) _Timers.Add(this);
}
/// <summary>
/// Command Line Parameter /Timing turns timing on
/// </summary>
private static bool? _TimingsOn = null;
public static bool TimingsOn
{
get
@@ -73,18 +54,6 @@ namespace Volian.Base.Library
}
}
/// <summary>
/// Constructor with Module and line number
/// </summary>
/// <param name="module">Method Name, File Name</param>
/// <param name="line">Code Line Number</param>
public VolianTimer(string module, int line)
{
Count = 0;
Ticks = 0;
Name = string.Format("{0}:{1}", module, line);
if(TimingsOn) _Timers.Add(this);
}
/// <summary>
/// Start Timer
/// </summary>
public void Open()