internal HystrixCommandMetrics(HystrixCommandKey key, HystrixCommandGroupKey commandGroup, IHystrixCommandProperties properties, IHystrixEventNotifier eventNotifier)
 {
     this.key                 = key;
     this.group               = commandGroup;
     this.properties          = properties;
     this.counter             = new HystrixRollingNumber(properties.MetricsRollingStatisticalWindowInMilliseconds, properties.MetricsRollingStatisticalWindowBuckets);
     this.percentileExecution = new HystrixRollingPercentile(properties.MetricsRollingPercentileWindowInMilliseconds, properties.MetricsRollingPercentileWindowBuckets, properties.MetricsRollingPercentileBucketSize, properties.MetricsRollingPercentileEnabled);
     this.percentileTotal     = new HystrixRollingPercentile(properties.MetricsRollingPercentileWindowInMilliseconds, properties.MetricsRollingPercentileWindowBuckets, properties.MetricsRollingPercentileBucketSize, properties.MetricsRollingPercentileEnabled);
     this.eventNotifier       = eventNotifier;
 }
Пример #2
0
 public static HystrixCommandSetter WithGroupKey(HystrixCommandGroupKey groupKey)
 {
     return(new HystrixCommandSetter(groupKey));
 }
 public static HystrixCommandMetrics GetInstance(HystrixCommandKey key, HystrixCommandGroupKey commandGroup, IHystrixCommandProperties properties)
 {
     return(metrics.GetOrAdd(key.Name, w => new HystrixCommandMetrics(key, commandGroup, properties, HystrixPlugins.Instance.EventNotifier)));
 }
Пример #4
0
 public HystrixCommandSetter(HystrixCommandGroupKey groupKey)
 {
     this.groupKey = groupKey;
 }