Github user mybreeze77 commented on a diff in the pull request:

    https://github.com/apache/jmeter/pull/434#discussion_r235965931
  
    --- Diff: 
src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
 ---
    @@ -196,12 +196,18 @@ private void addMetrics(String transaction, 
SamplerMetric metric) {
         }
     
         private void addErrorMetric(String transaction, String responseCode, 
String responseMessage, long count) {
    +        final int MAX_RES_CODE_LENGTH_FOR_UDP = 50;
    --- End diff --
    
    
    
    
    
    
    
    Yes, I agree it is a property which is better to be decided by users. 
Actually 50 is a kind of empirical value. 
    
    More details said, as we can see below example, "count", "countError", 
"hit", etc. are integers with 4 bytes. "pct95.0", "pct99.0", etc. are doubles 
with 8 bytes. But as they will be converted to String in influx line protocal, 
they actually take about 10 bytes and 20 bytes respectively. Without response 
message, the data sent to influxdb as udp will be about 1350 bytes at most. 
    
    ```
    jmeter,application=application,transaction=all,statut=all 
count=304,countError=304,hit=304,sb=39216,rb=106688,pct95.0=13.0,pct99.0=16.969999999999985,pct90.0=12.900000000000006
 1542959710708000000 -- 300 bytes at most
    
    jmeter,application=application,statut=all,transaction=HTTP\ Request 
count=304,avg=8.8,min=6.0,max=17.0,sb=39216,rb=106688,pct95.0=13.0,pct99.0=16.969999999999985,pct90.0=12.900000000000006
 1542959710709000000 -- 300 bytes at most
    
    jmeter,application=application,statut=ko,transaction=HTTP\ Request 
count=304,avg=8.8,min=6.0,max=17.0,pct95.0=13.0,pct99.0=16.969999999999985,pct90.0=12.900000000000006
 1542959710710000000 -- 300 bytes at most
    
    jmeter,application=application,transaction=HTTP\ 
Request,responseCode=404,responseMessage=Vvvvvvvvvvvvvvvvvvvvvvvvvvvvvery 
llllllllllllllllllllllllllllllllllong mmmmmmmmmmmmmmmmmmmmmmessage count=304 
1542959710710000000 -- 300 bytes at most without response message
    
    jmeter,application=application,transaction=internal 
minAT=1,maxAT=1,meanAT=1,startedT=1,endedT=0 1542959710710000000 -- 150 bytes 
at most
    ```
    
    So for the size of response message, any value lower than 1500 - 1350 = 150 
will be safe. That's the reason we set it 50. Hope it clear.


---

Reply via email to