[ https://issues.apache.org/jira/browse/KAFKA-8881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
huxihx updated KAFKA-8881: -------------------------- Labels: needs-discussion (was: ) > Measure thread running time precisely > ------------------------------------- > > Key: KAFKA-8881 > URL: https://issues.apache.org/jira/browse/KAFKA-8881 > Project: Kafka > Issue Type: Improvement > Affects Versions: 2.4.0 > Reporter: huxihx > Priority: Major > Labels: needs-discussion > > Currently, the code uses `System.currentTimeMillis()` to measure timeout. > However, many situations trigger the thread suspend such as gc and context > switch. In such cases, the timeout value we specify is not strictly honored. > Maybe we could use ThreadMXBean#getCurrentThreadUserTime to precisely measure > the thread running time. -- This message was sent by Atlassian Jira (v8.3.2#803003)