From jboss-svn-commits at lists.jboss.org Tue May 13 13:14:13 2014
From: jboss-svn-commits at lists.jboss.org (jboss-svn-commits at lists.jboss.org)
Date: Tue, 13 May 2014 13:14:13 -0400
Subject: [jboss-svn-commits] JBL Code SVN: r38446 - in
labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin:
as5/src/main/resources/META-INF and 1 other directories.
Message-ID: <201405131714.s4DHEDb2005164@svn01.web.mwc.hst.phx2.redhat.com>
Author: tcunning
Date: 2014-05-13 13:14:13 -0400 (Tue, 13 May 2014)
New Revision: 38446
Modified:
labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml
labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml
labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
Log:
JBESB-3968
Eliminate (avg) message count metrics, make message counts themselves trendsup.
Modified: labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml 2014-02-28 13:27:06 UTC (rev 38445)
+++ labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml 2014-05-13 17:14:13 UTC (rev 38446)
@@ -115,8 +115,7 @@
-
-
+
@@ -203,13 +202,9 @@
-
-
-
-
-
-
+
+
+
Modified: labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml 2014-02-28 13:27:06 UTC (rev 38445)
+++ labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml 2014-05-13 17:14:13 UTC (rev 38446)
@@ -133,8 +133,7 @@
-
-
+
@@ -219,13 +218,10 @@
-
-
-
-
-
-
+
+
+
Modified: labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2014-02-28 13:27:06 UTC (rev 38445)
+++ labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2014-05-13 17:14:13 UTC (rev 38446)
@@ -43,6 +43,7 @@
private static final String PROCESSING_TIME = "processing time";
private static final String OVERALL_BYTES_PROCESSED = "processed bytes";
private static final String OVERALL_BYTES_FAILED = "failed bytes";
+ private static final String OVERALL_MESSAGE_COUNT = "overall service message count";
private static final String OVERALL_METRIC_NAME = "overallMessagesCount";
private static final String SUCCESS_METRIC_NAME = "successProcessedCount";
@@ -155,19 +156,18 @@
counterBytesFailed += bytesFailed.longValue();
}
report.addData(new MeasurementDataNumeric(request, new Double(bytesFailed.doubleValue())));
- }
+ } else if (metricName.equals(OVERALL_METRIC_NAME)) {
+ EmsAttribute attribute = this.bean.getAttribute(OVERALL_MESSAGE_COUNT);
+ Integer processed = new Integer(0);
+ if (attribute != null) {
+ processed = (Integer) attribute.refresh();
+ }
+ report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
+ }
}
for (MeasurementScheduleRequest request : requests) {
String metricName = request.getName();
- if (metricName.equals (OVERALL_METRIC_NAME)) {
- report.addData(new MeasurementDataNumeric(request, new Double(counter)));
- } else if (metricName.equals(OVERALL_MINUTE_METRIC_NAME)) {
- report.addData(new MeasurementDataNumeric(request, new Double(counter)));
- } else if (metricName.equals(SUCCESS_MINUTE_METRIC_NAME)) {
- report.addData(new MeasurementDataNumeric(request, new Double(success)));
- } else if (metricName.equals(FAILED_MINUTE_METRIC_NAME)) {
- report.addData(new MeasurementDataNumeric(request, new Double(failed)));
- } else if (metricName.equals(OVERALL_BYTES_METRIC_NAME)) {
+ if (metricName.equals(OVERALL_BYTES_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(counterBytesProcessed + counterBytesFailed)));
}
}
Modified: labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2014-02-28 13:27:06 UTC (rev 38445)
+++ labs/jbossesb/branches/JBESB_4_11_CP2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2014-05-13 17:14:13 UTC (rev 38446)
@@ -122,12 +122,5 @@
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
}
}
-
- for (MeasurementScheduleRequest request : requests) {
- String metricName = request.getName();
- if (metricName.equals(OVERALL_MINUTE_METRIC_NAME)) {
- report.addData(new MeasurementDataNumeric(request, new Double(overallMessages.doubleValue())));
- }
- }
}
}