internal BudgetWrapper(T innerBudget) { if (innerBudget == null) { throw new ArgumentNullException("innerBudget"); } this.innerBudget = innerBudget; WorkloadManagementLogger.SetBudgetType(this.BudgetType.ToString(), null); }
private void Initialize(BudgetKey owner, IThrottlingPolicy policy, string policyPart, string policyValue, int backoffTime, string snapshot) { this.owner = owner.ToString(); this.isServiceAccountBudget = owner.IsServiceAccountBudget; this.throttlingPolicyDN = policy.GetIdentityString(); this.budgetType = owner.BudgetType; this.policyPart = policyPart; this.policyValue = policyValue; this.backoffTime = backoffTime; this.snapshot = snapshot; ThrottlingPerfCounterWrapper.IncrementOverBudget(owner, TimeSpan.FromMilliseconds((double)backoffTime)); WorkloadManagementLogger.SetOverBudget(policyPart, policyValue, null); WorkloadManagementLogger.SetBudgetType(owner.BudgetType.ToString(), null); }