mirror of https://github.com/apache/jmeter.git
				
				
				
			Bug 59953 - GraphiteBackendListener : Add Average metric
Bugzilla Id: 59953 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1755398 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
		
							parent
							
								
									458ca49ae6
								
							
						
					
					
						commit
						d48d25185d
					
				|  | @ -85,21 +85,25 @@ public class GraphiteBackendListenerClient extends AbstractBackendListenerClient | ||||||
|     private static final String METRIC_COUNT = "count"; //$NON-NLS-1$ |     private static final String METRIC_COUNT = "count"; //$NON-NLS-1$ | ||||||
|     private static final String METRIC_MIN_RESPONSE_TIME = "min"; //$NON-NLS-1$ |     private static final String METRIC_MIN_RESPONSE_TIME = "min"; //$NON-NLS-1$ | ||||||
|     private static final String METRIC_MAX_RESPONSE_TIME = "max"; //$NON-NLS-1$ |     private static final String METRIC_MAX_RESPONSE_TIME = "max"; //$NON-NLS-1$ | ||||||
|  |     private static final String METRIC_AVG_RESPONSE_TIME = "avg"; //$NON-NLS-1$ | ||||||
|     private static final String METRIC_PERCENTILE = "pct"; //$NON-NLS-1$ |     private static final String METRIC_PERCENTILE = "pct"; //$NON-NLS-1$ | ||||||
|      |      | ||||||
|     private static final String METRIC_OK_COUNT             = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; |     private static final String METRIC_OK_COUNT             = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; | ||||||
|     private static final String METRIC_OK_MIN_RESPONSE_TIME = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; |     private static final String METRIC_OK_MIN_RESPONSE_TIME = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; | ||||||
|     private static final String METRIC_OK_MAX_RESPONSE_TIME = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; |     private static final String METRIC_OK_MAX_RESPONSE_TIME = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; | ||||||
|  |     private static final String METRIC_OK_AVG_RESPONSE_TIME = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_AVG_RESPONSE_TIME; | ||||||
|     private static final String METRIC_OK_PERCENTILE_PREFIX = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; |     private static final String METRIC_OK_PERCENTILE_PREFIX = METRIC_OK_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; | ||||||
| 
 | 
 | ||||||
|     private static final String METRIC_KO_COUNT             = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; |     private static final String METRIC_KO_COUNT             = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; | ||||||
|     private static final String METRIC_KO_MIN_RESPONSE_TIME = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; |     private static final String METRIC_KO_MIN_RESPONSE_TIME = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; | ||||||
|     private static final String METRIC_KO_MAX_RESPONSE_TIME = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; |     private static final String METRIC_KO_MAX_RESPONSE_TIME = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; | ||||||
|  |     private static final String METRIC_KO_AVG_RESPONSE_TIME = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_AVG_RESPONSE_TIME; | ||||||
|     private static final String METRIC_KO_PERCENTILE_PREFIX = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; |     private static final String METRIC_KO_PERCENTILE_PREFIX = METRIC_KO_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; | ||||||
| 
 | 
 | ||||||
|     private static final String METRIC_ALL_COUNT             = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; |     private static final String METRIC_ALL_COUNT             = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; | ||||||
|     private static final String METRIC_ALL_MIN_RESPONSE_TIME = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; |     private static final String METRIC_ALL_MIN_RESPONSE_TIME = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_MIN_RESPONSE_TIME; | ||||||
|     private static final String METRIC_ALL_MAX_RESPONSE_TIME = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; |     private static final String METRIC_ALL_MAX_RESPONSE_TIME = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_MAX_RESPONSE_TIME; | ||||||
|  |     private static final String METRIC_ALL_AVG_RESPONSE_TIME = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_AVG_RESPONSE_TIME; | ||||||
|     private static final String METRIC_ALL_PERCENTILE_PREFIX = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; |     private static final String METRIC_ALL_PERCENTILE_PREFIX = METRIC_ALL_PREFIX+METRIC_SEPARATOR+METRIC_PERCENTILE; | ||||||
| 
 | 
 | ||||||
|     private static final String METRIC_ALL_HITS_COUNT        = METRIC_HITS_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; |     private static final String METRIC_ALL_HITS_COUNT        = METRIC_HITS_PREFIX+METRIC_SEPARATOR+METRIC_COUNT; | ||||||
|  | @ -185,6 +189,7 @@ public class GraphiteBackendListenerClient extends AbstractBackendListenerClient | ||||||
|             if(metric.getSuccesses()>0) { |             if(metric.getSuccesses()>0) { | ||||||
|                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_OK_MIN_RESPONSE_TIME, Double.toString(metric.getOkMinTime())); |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_OK_MIN_RESPONSE_TIME, Double.toString(metric.getOkMinTime())); | ||||||
|                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_OK_MAX_RESPONSE_TIME, Double.toString(metric.getOkMaxTime())); |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_OK_MAX_RESPONSE_TIME, Double.toString(metric.getOkMaxTime())); | ||||||
|  |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_OK_AVG_RESPONSE_TIME, Double.toString(metric.getOkMean())); | ||||||
|                 for (Map.Entry<String, Float> entry : okPercentiles.entrySet()) { |                 for (Map.Entry<String, Float> entry : okPercentiles.entrySet()) { | ||||||
|                     graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  |                     graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  | ||||||
|                             entry.getKey(),  |                             entry.getKey(),  | ||||||
|  | @ -194,6 +199,7 @@ public class GraphiteBackendListenerClient extends AbstractBackendListenerClient | ||||||
|             if(metric.getFailures()>0) { |             if(metric.getFailures()>0) { | ||||||
|                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_KO_MIN_RESPONSE_TIME, Double.toString(metric.getKoMinTime())); |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_KO_MIN_RESPONSE_TIME, Double.toString(metric.getKoMinTime())); | ||||||
|                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_KO_MAX_RESPONSE_TIME, Double.toString(metric.getKoMaxTime())); |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_KO_MAX_RESPONSE_TIME, Double.toString(metric.getKoMaxTime())); | ||||||
|  |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_KO_AVG_RESPONSE_TIME, Double.toString(metric.getKoMean())); | ||||||
|                 for (Map.Entry<String, Float> entry : koPercentiles.entrySet()) { |                 for (Map.Entry<String, Float> entry : koPercentiles.entrySet()) { | ||||||
|                     graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  |                     graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  | ||||||
|                             entry.getKey(),  |                             entry.getKey(),  | ||||||
|  | @ -202,6 +208,7 @@ public class GraphiteBackendListenerClient extends AbstractBackendListenerClient | ||||||
|             } |             } | ||||||
|             graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_ALL_MIN_RESPONSE_TIME, Double.toString(metric.getAllMinTime())); |             graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_ALL_MIN_RESPONSE_TIME, Double.toString(metric.getAllMinTime())); | ||||||
|             graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_ALL_MAX_RESPONSE_TIME, Double.toString(metric.getAllMaxTime())); |             graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_ALL_MAX_RESPONSE_TIME, Double.toString(metric.getAllMaxTime())); | ||||||
|  |             graphiteMetricsManager.addMetric(timestampInSeconds, contextName, METRIC_ALL_AVG_RESPONSE_TIME, Double.toString(metric.getAllMean())); | ||||||
|             for (Map.Entry<String, Float> entry : allPercentiles.entrySet()) { |             for (Map.Entry<String, Float> entry : allPercentiles.entrySet()) { | ||||||
|                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  |                 graphiteMetricsManager.addMetric(timestampInSeconds, contextName,  | ||||||
|                         entry.getKey(),  |                         entry.getKey(),  | ||||||
|  |  | ||||||
|  | @ -96,6 +96,7 @@ Summary | ||||||
| 
 | 
 | ||||||
| <h3>Listeners</h3> | <h3>Listeners</h3> | ||||||
| <ul> | <ul> | ||||||
|  |     <li><bug>59953</bug>GraphiteBackendListener : Add Average metric. Partly contributed by Maxime Chassagneux (maxime.chassagneux at gmail.com)</li> | ||||||
| </ul> | </ul> | ||||||
| 
 | 
 | ||||||
| <h3>Timers, Assertions, Config, Pre- & Post-Processors</h3> | <h3>Timers, Assertions, Config, Pre- & Post-Processors</h3> | ||||||
|  | @ -200,6 +201,7 @@ Summary | ||||||
| <li>Asier Lostalé (asier.lostale at openbravo.com)</li> | <li>Asier Lostalé (asier.lostale at openbravo.com)</li> | ||||||
| <li>Thomas Peyrard (thomas.peyrard at murex.com)</li> | <li>Thomas Peyrard (thomas.peyrard at murex.com)</li> | ||||||
| <li>Benoit Wiart (b.wiart at ubik-ingenierie.com)</li> | <li>Benoit Wiart (b.wiart at ubik-ingenierie.com)</li> | ||||||
|  | <li>Maxime Chassagneux (maxime.chassagneux at gmail.com)</li> | ||||||
| </ul> | </ul> | ||||||
| <p>We also thank bug reporters who helped us improve JMeter. <br/> | <p>We also thank bug reporters who helped us improve JMeter. <br/> | ||||||
| For this release we want to give special thanks to the following reporters for the clear reports and tests made after our fixes:</p> | For this release we want to give special thanks to the following reporters for the clear reports and tests made after our fixes:</p> | ||||||
|  |  | ||||||
|  | @ -73,6 +73,8 @@ In this document we will present the configuration setup to graph and historize | ||||||
|       <dd>Min response time for successful responses of sampler name</dd> |       <dd>Min response time for successful responses of sampler name</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.ok.max</code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.ok.max</code></dt> | ||||||
|       <dd>Max response time for successful responses of sampler name</dd> |       <dd>Max response time for successful responses of sampler name</dd> | ||||||
|  |       <dt><code><rootMetricsPrefix><samplerName>.ok.avg</code></dt> | ||||||
|  |       <dd>Average response time for successful responses of sampler name.</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.ok.pct<percentileValue></code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.ok.pct<percentileValue></code></dt> | ||||||
|       <dd>Percentile computed for successful responses of sampler name. There will be one metric for each calculated value.</dd> |       <dd>Percentile computed for successful responses of sampler name. There will be one metric for each calculated value.</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.ko.count</code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.ko.count</code></dt> | ||||||
|  | @ -81,6 +83,8 @@ In this document we will present the configuration setup to graph and historize | ||||||
|       <dd>Min response time for failed responses of sampler name</dd> |       <dd>Min response time for failed responses of sampler name</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.ko.max</code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.ko.max</code></dt> | ||||||
|       <dd>Max response time for failed responses of sampler name</dd> |       <dd>Max response time for failed responses of sampler name</dd> | ||||||
|  |       <dt><code><rootMetricsPrefix><samplerName>.ko.avg</code></dt> | ||||||
|  |       <dd>Average response time for failed responses of sampler name.</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.ko.pct<percentileValue></code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.ko.pct<percentileValue></code></dt> | ||||||
|       <dd>Percentile computed for failed responses of sampler name. There will be one metric for each calculated value.</dd> |       <dd>Percentile computed for failed responses of sampler name. There will be one metric for each calculated value.</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.a.count</code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.a.count</code></dt> | ||||||
|  | @ -89,6 +93,8 @@ In this document we will present the configuration setup to graph and historize | ||||||
|       <dd>Min response time for responses of sampler name (min of ok.count and ko.count)</dd> |       <dd>Min response time for responses of sampler name (min of ok.count and ko.count)</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.a.max</code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.a.max</code></dt> | ||||||
|       <dd>Max response time for responses of sampler name (max of ok.count and ko.count)</dd> |       <dd>Max response time for responses of sampler name (max of ok.count and ko.count)</dd> | ||||||
|  |       <dt><code><rootMetricsPrefix><samplerName>.a.avg</code></dt> | ||||||
|  |       <dd>Average response time for responses of sampler name (avg of ok.count and ko.count)</dd> | ||||||
|       <dt><code><rootMetricsPrefix><samplerName>.a.pct<percentileValue></code></dt> |       <dt><code><rootMetricsPrefix><samplerName>.a.pct<percentileValue></code></dt> | ||||||
|       <dd>Percentile computed for responses of sampler name. There will be one metric for each calculated value. (calculated on the totals for OK and failed samples)</dd> |       <dd>Percentile computed for responses of sampler name. There will be one metric for each calculated value. (calculated on the totals for OK and failed samples)</dd> | ||||||
|     </dl> |     </dl> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue