/// <summary>Sets a new interval for a statement group identified by name. </summary> /// <param name="stmtGroupName">name of statement group as assigned through configuration</param> /// <param name="newInterval">new interval, or a -1 or zero value to disable reporting</param> public void SetStatementGroupInterval(String stmtGroupName, long newInterval) { StmtGroupMetrics metrics = StatementGroups.Get(stmtGroupName); if (metrics != null) { metrics.Interval = newInterval; } else { throw new ConfigurationException("Statement group by name '" + stmtGroupName + "' could not be found"); } }
/// <summary> /// Add a statement group, allowing control of metrics reporting interval per statement or per multiple statements. /// The reporting interval and be changed at runtime. /// <para/> /// Add pattern include and exclude criteria to control which /// </summary> /// <param name="name">of statement group, not connected to statement name, assigned as anarbitrary identifier for runtime changes to the interval</param> /// <param name="config">the statement group metrics configuration</param> public void AddStmtGroup(String name, StmtGroupMetrics config) { StatementGroups.Put(name, config); }