Why they use utility matrix SINGLETONS in LineImpl and CounterImpl?

19 views
Skip to first unread message

paco

unread,
Feb 7, 2017, 9:27:38 AM2/7/17
to JaCoCo and EclEmma Users

Good afternoon,
i am studying jacoco source code, and i would like to understand why they use a matrix of org.jacoco.core.internal.analysis.CounterImpl (2 dimenssion) or org.jacoco.core.internal.analysis.LineImpl (4 dimenssion) ? and why they limit matrix size with SINGLETON_LIMIT = 30 in CounterImpl;  SINGLETON_INS_LIMIT = 8 and  SINGLETON_BRA_LIMIT = 4 in LineImpl?
thankx

bjk...@gmail.com

unread,
Feb 7, 2017, 9:53:28 AM2/7/17
to JaCoCo and EclEmma Users
The idea is to share memory for commonly used values. There is no real significance to the actual array sizes; they were chosen to share a reasonable number of instances without consuming too much memory (for example, see the commit message of https://github.com/jacoco/jacoco/commit/3e5b0801b79e94cba9317f18e507d5e65737ce2c). I suspect the values could be changed if you had interesting data points.

paco

unread,
Feb 7, 2017, 12:05:48 PM2/7/17
to JaCoCo and EclEmma Users, bjk...@gmail.com


Le mardi 7 février 2017 14:53:28 UTC, bjk...@gmail.com a écrit :
The idea is to share memory for commonly used values.  There is no real significance to the actual array sizes; they were chosen to share a reasonable number of instances without consuming too much memory (for example, see the commit message of https://github.com/jacoco/jacoco/commit/3e5b0801b79e94cba9317f18e507d5e65737ce2c).  I suspect the values could be changed if you had interesting data points.

Thank a lot for your answer, i looked for the reason during many hours
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages