diff --git a/.classpath b/.classpath
index e46f7fe6..bdab707f 100644
--- a/.classpath
+++ b/.classpath
@@ -2,7 +2,6 @@
Display Name | +CM Name | +Group Name | + +Has System Alarms | +Is System Alarms Enabled | +Has User Defined Alarms | +Is User Defined Alarms Enabled | + + + +postponeTime | +queryTimeout | +
---|
+ Operation | +Name | +isDefaultValue | +value | +defaultValue | +datatype | +desciption | +property | +
---|
Operation | +Name | +isDefaultValue | +value | +defaultValue | +datatype | +desciption | +property | +
---|
Operation | +Name | +isDefaultValue | +value | +defaultValue | +datatype | +desciption | +property | +validatorName | +
---|
Operation | +Name | +isAlarmEnabled | +timeRangeCron | +timeRangeDescrption | +desciption | +
---|
Operation | +Name | + +isDefaultValue | +value | +defaultValue | +datatype | +desciption | +property | +validatorName | +
---|
sampleValue=320
sampleType
' +
+ 'sampleType
sampleType=MAX_OVER_SAMPLES&sampleValue=320
)sampleValue
will not be used.sampleValue
will not be used. (same as specify sampleType=MAX_OVER_SAMPLES&sampleValue=360
)Operation Name | Description |
---|---|
removeServer | Removed a DBMS Server from the system. |
disableServer | Disable a DBMS Server from the system. |
ddc|DataDirectoryCleaner | Execute a 'Data Directory Cleanup'. |
removeServer | Removed a DBMS Server from the system. |
disableServer | Disable a DBMS Server from the system. |
refreshCc | Send a 'refresh' message to name=srvName |
restartCc | Send a 'restart' message to name=srvName |
ddc|DataDirectoryCleaner | Execute a 'Data Directory Cleanup'. |
CmSettingsHelper.create_isAlarmEnabled(this, name)
+ *
+ * @param name
+ * @param cm
+ * @return
+ */
+ public CmSettingsHelper createIsAlarmEnabled(String name, CountersModel cm)
+ {
+ return CmSettingsHelper.create_isAlarmEnabled(this, name);
+ }
+
+ /**
+ * A simple wrapper method that calls CmSettingsHelper.create_timeRangeCron(this, name)
+ *
+ * @param name
+ * @param cm
+ * @return
+ */
+ public CmSettingsHelper createTimeRangeCron(String name, CountersModel cm)
+ {
+ return CmSettingsHelper.create_timeRangeCron(this, name);
+ }
+
+
/**
diff --git a/src/com/asetune/cm/ase/CmActiveStatements.java b/src/com/asetune/cm/ase/CmActiveStatements.java
index a4215741..12c55bcb 100644
--- a/src/com/asetune/cm/ase/CmActiveStatements.java
+++ b/src/com/asetune/cm/ase/CmActiveStatements.java
@@ -1559,6 +1559,8 @@ public List" + configArchiveMode + "
" + configArchiveCommand + "
{"yAxisScaleLabels":{...}, "sampleType":"xxx", "sampleValue":yyy}
+ *
+ * @param yAxisScaleLabels JSON String holding yAxisScaleLabels. "yAxisScaleLabels":{"name":"normal", "s0":"", "s1":" K", "s2":" M", "s3":" G", "s4":" T"}
+ *
+ * @param sampleType What sample type should be the default used.
+ * @param sampleValue What sample value should be used when reading data (depends on sampleType).
+ *
+ * This is typically called in the following way
+ * + * TrendGraphDataPoint.createGraphProps(TrendGraphDataPoint.Y_AXIS_SCALE_LABELS_NORMAL, CentralPersistReader.SampleType.MAX_OVER_SAMPLES, 360); + *+ * + * @return + */ + public static String createGraphProps(String yAxisScaleLabels, CentralPersistReader.SampleType sampleType, int sampleValue) + { + if (sampleType == null) + sampleType = CentralPersistReader.SampleType.AUTO; + + String sampleTypeAndValueStr = ""; + if (sampleType.equals(CentralPersistReader.SampleType.AUTO)) + { + sampleTypeAndValueStr=""; + } + else + { + String sampleValueStr = ""; + + if (sampleValue < 0) + sampleValueStr = ""; + else + sampleValueStr = fixJson(", |sampleValue|:" + sampleValue); + + sampleTypeAndValueStr = fixJson("|sampleType|:|" + sampleType.name() + "|") + sampleValueStr; + } + + + String separator = ""; + if (StringUtil.hasValue(sampleTypeAndValueStr)) + separator = ", "; + + return "{" + yAxisScaleLabels + separator + sampleTypeAndValueStr + "}"; + } + +// public static void main(String[] args) +// { +// System.out.println("["); +// System.out.println(" " + createGraphProps(Y_AXIS_SCALE_LABELS_BYTES, null, -1)); +// System.out.println("," + createGraphProps(Y_AXIS_SCALE_LABELS_BYTES, CentralPersistReader.SampleType.MAX_OVER_SAMPLES, -1)); +// System.out.println("," + createGraphProps(Y_AXIS_SCALE_LABELS_BYTES, CentralPersistReader.SampleType.MIN_OVER_SAMPLES, CentralPersistReader.SAMPLE_TYPE_AUTO__DEFAULT__SAMPLE_VALUE)); +// System.out.println("]"); +// } + + private boolean _initializedWithRuntimeReplacedLabels = false; private String _name = null; // private Timestamp _ts = null; diff --git a/src/com/asetune/gui/ResultSetTableModel.java b/src/com/asetune/gui/ResultSetTableModel.java index 1744ae3a..e2311bd9 100644 --- a/src/com/asetune/gui/ResultSetTableModel.java +++ b/src/com/asetune/gui/ResultSetTableModel.java @@ -4098,12 +4098,13 @@ public void guessDatatypes() for (int c=0; c
BACKUP DATABASE
or RAISERROR ('...', 0, 1) WITH NOWAIT
)
+ isPeriodAchieved()
+ */
+ public double getSum()
+ {
+ return getSum(0d, false);
+ }
+
+ /**
+ * Get SUM value for records that has been sampled during the sample period
+ * isPeriodAchieved()
+ *
+ * @param defaultVal default value
+ */
+ public double getSum(double defaultVal)
+ {
+ return getSum(defaultVal, false);
+ }
+
+ /**
+ * Get SUM value for records that has been sampled during the sample period
+ * returnDefaultIfPeriodHasNotBeenAchieved
isPeriodAchieved()
+ *
+ * @param defaultVal default value
+ * @param returnDefaultIfPeriodHasNotBeenAchieved like the name of the parameter
+ */
+ public synchronized double getSum(double defaultVal, boolean returnDefaultIfPeriodHasNotBeenAchieved)
+ {
+ return getSum(defaultVal, returnDefaultIfPeriodHasNotBeenAchieved, -1);
+ }
+
+ /**
+ * Get SUM value for records that has been sampled during the sample period
+ * returnDefaultIfPeriodHasNotBeenAchieved
isPeriodAchieved()
+ *
+ * @param defaultVal default value
+ * @param returnDefaultIfPeriodHasNotBeenAchieved like the name of the parameter
+ * @param capValue Upper value for the avgCalculation, only used if above 0. (values above this will be read as "this" value)
+ *
+ */
+ public synchronized double getSum(double defaultVal, boolean returnDefaultIfPeriodHasNotBeenAchieved, double capValue)
+ {
+ // first remove old entries
+ removeOldEntries();
+
+ int size = _values.size();
+ double sum = 0;
+
+ if (size == 0)
+ return defaultVal;
+
+ if ( returnDefaultIfPeriodHasNotBeenAchieved && ! isPeriodAchieved() )
+ return defaultVal;
+
+ for (Entry e : _values)
+ {
+ if (capValue > 0 && e._val > capValue)
+ {
+ sum += capValue;
+ }
+ else
+ {
+ sum += e._val;
+ }
+ }
+
+ return sum;
+ }
+
+
+
+
/**
* Get peak/max value over the period
* @return
diff --git a/src/com/asetune/xmenu/SqlSentryPlanExplorer.java b/src/com/asetune/xmenu/SqlSentryPlanExplorer.java
index 378767e7..fe217bca 100644
--- a/src/com/asetune/xmenu/SqlSentryPlanExplorer.java
+++ b/src/com/asetune/xmenu/SqlSentryPlanExplorer.java
@@ -57,7 +57,8 @@ public class SqlSentryPlanExplorer
// private boolean _closeConnOnExit;
public final static String PROPKEY_SQL_PLAN_EXPLORER = "SqlSentryPlanExplorer";
- public final static String DEFAULT_SQL_PLAN_EXPLORER = "C:\\Program Files\\SentryOne\\SentryOne Plan Explorer\\SentryOne Plan Explorer.exe";
+// public final static String DEFAULT_SQL_PLAN_EXPLORER = "C:\\Program Files\\SentryOne\\SentryOne Plan Explorer\\SentryOne Plan Explorer.exe";
+ public final static String DEFAULT_SQL_PLAN_EXPLORER = "C:\\Program Files\\SolarWinds\\SQL Sentry Plan Explorer\\SQL Sentry Plan Explorer.exe.exe";
/**
*
*/