[ 
https://issues.apache.org/jira/browse/FLINK-10082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585602#comment-16585602
 ] 

ASF GitHub Bot commented on FLINK-10082:
----------------------------------------

zentol opened a new pull request #6580: [FLINK-10082][metrics][slf4j] Provide 
initial size to StringBuilder
URL: https://github.com/apache/flink/pull/6580
 
 
   ## What is the purpose of the change
   
   Small modification to the `Slf4jReporter` to initialize the used 
`StringBuilder` with the size of the previous report, to prevent frequent 
resizing of the backing array.
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Initialize StringBuilder in Slf4jReporter with estimated size
> -------------------------------------------------------------
>
>                 Key: FLINK-10082
>                 URL: https://issues.apache.org/jira/browse/FLINK-10082
>             Project: Flink
>          Issue Type: Improvement
>          Components: Metrics
>    Affects Versions: 1.5.2, 1.6.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Major
>              Labels: pull-request-available
>
> The {{Slf4jReporter}} uses a StringBuilder to generate the report that is 
> later logged. Currently we don't pass the initial size, which for large 
> deployments can result in frequent resizing of the backing array.
> We could either estimate the expected size based on the # of metrics, or 
> store the size of the last report (given that the total metrics space is 
> fairly constant).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to