internal CommandMetrics([NotNull]string name, [NotNull]string commandGroup, [NotNull]CommandProperties properties, IClock clock=null)
{
CommandGroup = commandGroup;
_clock = clock ?? Clock.GetInstance();
this._properties = properties;
CommandName = name;
_counter = new RollingNumber(_clock, properties.MetricsRollingStatisticalWindowInMilliseconds.Value, properties.MetricsRollingStatisticalWindowBuckets.Value);
_percentileExecution = new RollingPercentileNumber(_clock, properties.MetricsRollingPercentileWindowInMilliseconds.Value, properties.MetricsRollingPercentileWindowBuckets.Value, properties.MetricsRollingPercentileBucketSize.Value, properties.MetricsRollingPercentileEnabled);
_percentileTotal = new RollingPercentileNumber(_clock, properties.MetricsRollingPercentileWindowInMilliseconds.Value, properties.MetricsRollingPercentileWindowBuckets.Value, properties.MetricsRollingPercentileBucketSize.Value, properties.MetricsRollingPercentileEnabled);
}